Skip to content

Commit e57e523

Browse files
Merge pull request #231 from github/broccolinisoup/publish-gpr
Add a job to publish the package in GPR
2 parents 4ab3f28 + 4cffb4d commit e57e523

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/publish.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66

77
jobs:
88
publish-npm:
9+
name: Publish to npm
910
runs-on: ubuntu-latest
1011
permissions:
1112
contents: read
@@ -43,3 +44,27 @@ jobs:
4344
- run: npm whoami; npm --ignore-scripts publish --provenance --access public
4445
env:
4546
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
47+
publish-github:
48+
name: Publish to GitHub Packages
49+
runs-on: ubuntu-latest
50+
needs: [bump-version, create-release]
51+
permissions:
52+
contents: read
53+
packages: write
54+
steps:
55+
- name: Checkout ref
56+
uses: actions/checkout@v3
57+
- name: Setup Node
58+
uses: actions/setup-node@v3
59+
with:
60+
node-version: 18
61+
registry-url: https://registry.npmjs.org/
62+
cache: npm
63+
- name: Install npm depencies
64+
run: npm ci
65+
- name: Build package
66+
run: npm run build
67+
- name: Publish
68+
run: npm publish
69+
env:
70+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)