-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (35 loc) · 984 Bytes
/
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
37
38
39
name: Release
run-name: "Release (branch: ${{ github.event.workflow_run.head_branch }})"
on:
workflow_run:
workflows: [Tests]
types: [completed]
branches: [main]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-release
jobs:
release:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.workflow_run.head_branch }}
- uses: actions/cache/restore@v3
with:
path: |
**/node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
- run: npm run build
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
run: npm run release