generated from digitalservicebund/npm-package-example
-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (30 loc) · 919 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
name: Release
# setup the workflow trigger(s) according to your needs
# see: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow
on:
# push:
# branches: ["main", "alpha", "beta", "next", "next-major"]
# manual
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org
scope: "@digitalservicebund"
- run: npm ci
- run: npm run build
- run: npm test
- name: Release
run: cd dist && npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# create NPM_TOKEN repository secret (repo settings -> secrets and variables)
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}