Skip to content

Commit 8f988ef

Browse files
committed
Add workflow to publish NPM package
1 parent 33aca2b commit 8f988ef

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ permissions:
1111
jobs:
1212
lint:
1313
runs-on: ubuntu-latest
14+
continue-on-error: true
1415
steps:
1516
- uses: actions/checkout@v4
1617
- uses: actions/setup-node@v4
@@ -48,3 +49,25 @@ jobs:
4849
with:
4950
name: build
5051
path: dist/netzgrafik-frontend/
52+
53+
publish:
54+
runs-on: ubuntu-latest
55+
needs: build
56+
permissions:
57+
contents: read
58+
id-token: write
59+
steps:
60+
- uses: actions/checkout@v4
61+
- name: Download build artifacts
62+
uses: actions/download-artifact@v4
63+
with:
64+
name: build
65+
path: dist/netzgrafik-frontend/
66+
- uses: actions/setup-node@v4
67+
with:
68+
registry-url: 'https://registry.npmjs.org'
69+
- run: npm version --no-git-tag-version "0.0.0+$GITHUB_SHA"
70+
- run: npm pkg delete dependencies optionalDependencies devDependencies
71+
- run: npm publish --provenance --access public --tag snapshot
72+
env:
73+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)