Skip to content

Release

Release #4

Workflow file for this run

name: Release
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm ci
- run: npm run build
- name: Prepare release notes
run: |
VERSION="${GITHUB_REF_NAME}"
NOTES="release-notes/release-${VERSION}.md"
if [ ! -f "$NOTES" ]; then
echo "No release notes provided for version ${VERSION}." > "$NOTES"
fi
PREV_TAG=$(git tag --sort=-version:refname | grep -A1 "^${VERSION}$" | tail -1)
if [ -n "$PREV_TAG" ] && [ "$PREV_TAG" != "$VERSION" ]; then
echo "" >> "$NOTES"
echo "**Full changelog**: https://github.com/${{ github.repository }}/compare/${PREV_TAG}...${VERSION}" >> "$NOTES"
fi
- uses: softprops/action-gh-release@v2
with:
name: ${{ github.ref_name }}
body_path: release-notes/release-${{ github.ref_name }}.md
make_latest: true
draft: true
prerelease: false
files: |
dist/main.js
dist/manifest.json
dist/styles.css