Repository navigation
64 lines (56 loc) · 1.66 KB
/
Copy pathrelease-notes.yml
File metadata and controls
64 lines (56 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
name: Release Notes
# Release-notes automation: when a version tag is pushed, create a GitHub
# Release with notes generated from the commits/PRs between tags. The notes
# land in the release (and the GitHub release feed) without manual writing.
#
# Tagging a release:
# git tag vX.Y.Z && git push origin vX.Y.Z
permissions:
contents: write
on:
push:
tags:
- 'v*.*.*'
jobs:
# Prove the tag is releasable before publishing anything about it.
build-verification:
name: Verify the tagged revision builds
runs-on: ubuntu-latest
timeout-minutes: 25
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
submodules: false
- uses: ./.github/actions/setup-node-pnpm
with:
node-version: '24.16.0'
cache-key-prefix: 'quality-v1'
- name: Production build
run: pnpm build
release:
needs: build-verification
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
submodules: false
- name: Create GitHub release with generated notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
if gh release view "$TAG" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
echo "Release for $TAG already exists; leaving it untouched."
exit 0
fi
gh release create "$TAG" \
--repo "$GITHUB_REPOSITORY" \
--verify-tag \
--generate-notes \
--latest