diff --git a/.github/workflows/publish-github.yml b/.github/workflows/publish-github.yml deleted file mode 100644 index ea2d329..0000000 --- a/.github/workflows/publish-github.yml +++ /dev/null @@ -1,36 +0,0 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages - -name: Node.js Package - -on: - release: - types: [created] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: npm ci - - run: npm test - - publish-gpr: - needs: build - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - registry-url: https://npm.pkg.github.com/ - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cfda812..5bd115c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -31,13 +31,12 @@ jobs: - name: Run checks run: npm run check - # Create GitHub Release - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: generate_release_notes: true - # Publish to npm + # Publish to npm as @saiden/browse - uses: actions/setup-node@v4 with: node-version: '20' @@ -48,13 +47,16 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - # Publish to GitHub Packages + # Publish to GitHub Packages as @saiden-dev/browse - uses: actions/setup-node@v4 with: node-version: '20' registry-url: 'https://npm.pkg.github.com' + scope: '@saiden-dev' - name: Publish to GitHub Packages - run: npm publish + run: | + npm pkg set name='@saiden-dev/browse' + npm publish env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}