Skip to content

DevOps: Extend build and setup commands to also upgrade the Lume CLI … #72

DevOps: Extend build and setup commands to also upgrade the Lume CLI …

DevOps: Extend build and setup commands to also upgrade the Lume CLI … #72

Workflow file for this run

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-24.04
steps:
- name: Setup Deno
uses: "denoland/setup-deno@v2"
with:
deno-version: v2.x
- 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-24.04
steps:
- name: Setup Deno
uses: "denoland/setup-deno@v2"
with:
deno-version: v2.x
- 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-24.04
permissions:
id-token: write
pages: write
steps:
- name: Setup Deno
uses: "denoland/setup-deno@v2"
with:
deno-version: v2.x
- 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-24.04
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