-
Notifications
You must be signed in to change notification settings - Fork 4
41 lines (35 loc) · 1.02 KB
/
build.yml
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
name: Build
on:
push:
branches:
- 'release-*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: npm
- uses: dotnet/nbgv@master
id: nbgv
with:
stamp: package.json
- run: npm ci
- run: npm test
- run: npm run build
# this makes it possible to commit
- run: |
git config user.name github-actions
git config user.email [email protected]
# force-add the ignored 'dist' folder, amend HEAD, and tag it with the version number
- run: |
git add -f dist
git commit --amend -C HEAD
git tag 'v${{ steps.nbgv.outputs.SemVer2 }}'
# push ONLY the tag, so the original commit remains w/o the 'dist' folder
- run: git push origin 'refs/tags/v${{ steps.nbgv.outputs.SemVer2 }}'