diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml index e9cbca1..227b68a 100644 --- a/.github/workflows/release-package.yml +++ b/.github/workflows/release-package.yml @@ -1,33 +1,24 @@ -name: Node.js Package - +name: Publish 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 + publish: runs-on: ubuntu-latest permissions: - packages: write 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 install + - run: npm run build + - run: | + echo @RENCI:https://npm.pkg.github.com/ > build/.npmrc + echo '//npm.pkg.github.com/:_authToken=${NPM_TOKEN}' >> build/.npmrc - run: npm publish + working-directory: ./build env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}