forked from framesjs/frames.js
-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (37 loc) · 1.1 KB
/
release-framesjs-package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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