mirror of
https://github.com/efiten/coredrive-rx.git
synced 2026-11-23 12:57:58 +00:00
The folded history still made every body list all earlier releases, which the GitHub releases list already shows. The body is now the tag's own docs/releases file plus one link to the releases list. The job still fails on a tag without a notes file.
28 lines
874 B
YAML
28 lines
874 B
YAML
name: Release
|
|
on:
|
|
push:
|
|
tags: ['v*']
|
|
permissions:
|
|
contents: write
|
|
jobs:
|
|
build-release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
# Before the build, so a tag with no release notes fails in seconds instead of
|
|
# publishing a body that is only a changelog link (AGENTS.md, issue #12).
|
|
- name: Assemble release notes
|
|
run: node scripts/release-notes.mjs "$GITHUB_REF_NAME" > RELEASE_BODY.md
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- name: Package dist
|
|
run: cd dist && zip -r "../coredrive-rx-${GITHUB_REF_NAME}.zip" . && cd ..
|
|
- name: Publish release with the built artifact
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: coredrive-rx-*.zip
|
|
body_path: RELEASE_BODY.md
|