-
Notifications
You must be signed in to change notification settings - Fork 41
36 lines (36 loc) · 1.21 KB
/
release.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
name: Release Workflow
on:
push:
# Match LTS, saas releases >= 10 and master
branches: ['[1-9][0-9].[0-9]', 'saas-[1-9][0-9].[0-9]', 'master']
jobs:
release:
if: contains(github.event.head_commit.message, '[REL]')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
- name: Parse
id: parse
# should work with le latest stable node
# parse-message will fail on invalid commit title/body
run: |
npm i @actions/core @actions/github --no-save &&\
echo "data=$(node tools/parse_message.cjs)" >> $GITHUB_OUTPUT
# generate all builds
- name: Build
run: npm ci && npm run dist
- name: Release
uses: ncipollo/release-action@v1.12.0
with:
tag: ${{ fromJSON(steps.parse.outputs.data).version }}
body: ${{ fromJSON(steps.parse.outputs.data).body }}
artifacts: "./dist/*.*"
makeLatest: true
prerelease: ${{ fromJSON(steps.parse.outputs.data).prerelease }}
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}