Skip to content

Commit b1fdfc5

Browse files
Merge pull request #382 from observerly/ci/workflows/publish
ci: enable dual registry publishing for scoped private in @observerly/astrometry
2 parents 1aa5537 + d59b101 commit b1fdfc5

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.github/workflows/publish.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: astrometry/publish
22

33
on:
4+
pull_request:
5+
branches:
6+
- main
7+
48
release:
59
types: [published]
610

@@ -33,7 +37,6 @@ jobs:
3337
uses: actions/setup-node@v4
3438
with:
3539
node-version: ${{ matrix.node }}
36-
registry-url: 'https://npm.pkg.github.com'
3740
# Defaults to the user or organization that owns the workflow file:
3841
scope: '@observerly'
3942

@@ -54,11 +57,18 @@ jobs:
5457
- name: Build the package ready for publishing
5558
run: pnpm run build
5659

57-
- uses: JS-DevTools/npm-publish@v3
60+
- name: Publish to NPM 📦
61+
uses: JS-DevTools/npm-publish@v3
5862
with:
5963
registry: 'https://registry.npmjs.org/'
6064
access: 'public'
6165
token: ${{ secrets.NPM_OBSERVERLY_PUBLIC_TOKEN }}
66+
provenance: true
6267

63-
- name: Publish to JSR.io 🚀
64-
run: npx jsr publish
68+
- name: Publish to GitHub Packages 📦
69+
uses: JS-DevTools/npm-publish@v3
70+
with:
71+
registry: 'https://npm.pkg.github.com'
72+
access: 'restricted'
73+
token: ${{ secrets.GITHUB_TOKEN }}
74+
provenance: true

.npmrc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
#/*****************************************************************************************************************/
88

99
registry=https://registry.npmjs.org/
10-
@jsr:registry=https://npm.jsr.io
1110
@observerly:registry=https://registry.npmjs.org/
12-
@observerly:registry=https://npm.jsr.io
1311
//npm.pkg.github.com/:_authToken=${NPM_TOKEN}
1412

1513
#/*****************************************************************************************************************/

0 commit comments

Comments
 (0)