-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (39 loc) · 1.42 KB
/
release.yaml
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
# This workflow release a new semantic version of npm package
# For more information see: https://github.com/semantic-release/semantic-release/blob/2b94bb4e0967c705ab92deace342f9fecb02909d/docs/recipes/ci-configurations/github-actions.md
name: Release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: 'Generate GitHub Token'
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.SEMANTIC_RELEASE_BOT_APP_ID }}
private_key: ${{ secrets.SEMANTIC_RELEASE_BOT_PRIVATE_KEY }}
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
token: ${{ steps.generate_token.outputs.token }}
- name: Set up NodeJs ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install Dependencies 🚧
run: npm ci
- name: Build Package 🛠
run: npm pack
- name: Release 🚀
run: npm run release --debug
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}