-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (37 loc) · 1.28 KB
/
release-github.yml
File metadata and controls
37 lines (37 loc) · 1.28 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
name: Release to GitHub
on:
push:
tags:
- "v*"
jobs:
test:
uses: ./.github/workflows/ci.yml
release:
# based on esbuild release script (MIT licensed):
# https://github.com/evanw/esbuild/blob/master/.github/workflows/release.yml
needs: test
environment: release-github
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v5.0.0
with:
persist-credentials: false
- uses: actions/setup-node@v5.0.0
with:
node-version-file: ".node-version"
- name: Install dependencies amd build
run: |
npm ci
npm run build
- name: Extract changelog
run: |
VERSION="${GITHUB_REF_NAME#v}"
sh scripts/print-changelog.sh "$VERSION" >| ${{ github.workspace }}/RELEASE_NOTES
- name: Create GitHub Release
uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 #v2.4.1
with:
body_path: ${{ github.workspace }}/RELEASE_NOTES
prerelease: true
fail_on_unmatched_files: true