Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Release Package" | |
on: | |
release: | |
types: [created] | |
jobs: | |
publish-gpr: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
defaults: | |
run: | |
working-directory: ./packages/frames.js | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
registry-url: https://npm.pkg.github.com/ | |
# this is a workaround for publishing with npm publish | |
- run: npm pkg set 'name'='@dscvr-one/frames.js' | |
- run: rm ../../.npmrc | |
- run: | | |
echo "//npm.pkg.github.com/:_authToken=\${GITHUB_TOKEN}" > .npmrc | |
echo "@dscvr-one:registry=https://npm.pkg.github.com/" >> .npmrc | |
- run: yarn install | |
- run: yarn build | |
- run: yarn pack | |
- run: npm publish --access=public --registry=https://npm.pkg.github.com *.tgz | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: release-package | |
path: ./*.tgz |