Skip to content

Commit

Permalink
ci: enable dual registry publishing for scoped private in @observerly…
Browse files Browse the repository at this point in the history
…/astrometry

ci: enable dual registry publishing for scoped private in @observerly/astrometry
  • Loading branch information
michealroberts committed Aug 22, 2024
1 parent 1aa5537 commit 83befac
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: astrometry/publish

on:
pull_request:
branches:
- main

release:
types: [published]

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

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

- uses: JS-DevTools/npm-publish@v3
- name: Publish to GitHub Packages 📦
uses: JS-DevTools/npm-publish@v3
with:
registry: 'https://npm.pkg.github.com'
access: 'restricted'
token: ${{ secrets.GITHUB_TOKEN }}
provenance: true

- name: Publish to NPM 📦
uses: JS-DevTools/npm-publish@v3
with:
registry: 'https://registry.npmjs.org/'
access: 'public'
token: ${{ secrets.NPM_OBSERVERLY_PUBLIC_TOKEN }}

- name: Publish to JSR.io 🚀
run: npx jsr publish
provenance: true
2 changes: 0 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
#/*****************************************************************************************************************/

registry=https://registry.npmjs.org/
@jsr:registry=https://npm.jsr.io
@observerly:registry=https://registry.npmjs.org/
@observerly:registry=https://npm.jsr.io
//npm.pkg.github.com/:_authToken=${NPM_TOKEN}

#/*****************************************************************************************************************/

0 comments on commit 83befac

Please sign in to comment.