Skip to content

Release

Release #12

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
id-token: write
jobs:
lint:
uses: ./.github/workflows/lint.yml

Check failure on line 14 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

error parsing called workflow ".github/workflows/release.yml" -> "./.github/workflows/lint.yml" : workflow was not found. See https://docs.github.com/actions/learn-github-actions/reusing-workflows#access-to-reusable-workflows for more information.
test:
uses: ./.github/workflows/test.yml
publish:
name: Publish
needs: [lint, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-node@v5
with:
node-version: "lts/*"
registry-url: "https://registry.npmjs.org"
- name: Install Node packages
run: npm ci
- name: Build
run: npm run build
- name: Publish to npm
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Generate release notes
uses: orhun/git-cliff-action@v4
id: git-cliff
with:
config: cliff.toml
args: --latest --strip header
github_token: ${{ secrets.GITHUB_TOKEN }}
# TODO: Perhaps there is a simpler way to avoid the heading of each release
- name: Process release notes
id: process-notes
run: |
# Remove the first two lines (version heading and empty line)
cat << 'RELEASE_EOF' | tail -n +3 > release_notes.txt
${{ steps.git-cliff.outputs.content }}
RELEASE_EOF
echo "content<<EOF" >> $GITHUB_OUTPUT
cat release_notes.txt >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: ${{ github.ref_name }}
body: ${{ steps.process-notes.outputs.content }}