DevOps: Update dependencies #59
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- "[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].[0-9][0-9][0-9][0-9]" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Deno | |
uses: "denoland/setup-deno@v1" | |
with: | |
deno-version: 2.0.0-rc.10 | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup environment | |
run: | | |
deno task setup | |
sudo apt-get -y install exiftool | |
- name: Build site | |
run: deno task build | |
- name: Save build files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: site-build | |
overwrite: true | |
include-hidden-files: true | |
retention-days: 1 | |
compression-level: 9 | |
path: | | |
build/ | |
public/ | |
.env | |
test: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Deno | |
uses: "denoland/setup-deno@v1" | |
with: | |
deno-version: 2.0.0-rc.10 | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup environment | |
run: | | |
deno task setup | |
sudo apt-get -y install exiftool | |
- name: Get built files | |
uses: actions/download-artifact@v4 | |
with: | |
name: site-build | |
- name: Run tests | |
run: deno task test | |
deploy: | |
needs: test | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
pages: write | |
steps: | |
- name: Setup Deno | |
uses: "denoland/setup-deno@v1" | |
with: | |
deno-version: 2.0.0-rc.10 | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Get built files | |
uses: actions/download-artifact@v4 | |
with: | |
name: site-build | |
- name: Setup GitHub Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload GitHub Pages artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "public/" | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
release: | |
needs: test | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Generate release notes | |
run: | | |
git fetch --tags | |
PREV_TAG=$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`) | |
git log $PREV_TAG..HEAD --oneline --format="- [%s](https://github.com/brendanmurty/site/commit/%h)" --no-merges > release-notes.txt | |
- name: Create GitHub release | |
uses: ncipollo/release-action@v1 | |
with: | |
name: ${{ github.ref_name }} | |
tag: ${{ github.ref_name }} | |
bodyFile: release-notes.txt | |
makeLatest: true | |
- name: Cleanup | |
run: | | |
rm release-notes.txt |