We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0654fd5 commit 6b3c6ccCopy full SHA for 6b3c6cc
.github/workflows/main.yml
@@ -7,6 +7,8 @@ on:
7
pull_request:
8
branches:
9
- master
10
+ release:
11
+ types: [released, prereleased]
12
13
jobs:
14
test:
@@ -54,3 +56,22 @@ jobs:
54
56
else
55
57
echo "Skipping canary publish due to a fork/PR..."
58
fi
59
+
60
+ publish:
61
+ # publish to npm only when doing the release
62
+ if: ${{ github.event_name == 'release' }}
63
+ name: Publish Release
64
+ runs-on: ubuntu-latest
65
+ steps:
66
+ - name: Checkout Master
67
+ uses: actions/checkout@v1
68
+ - name: Use Node
69
+ uses: actions/setup-node@v1
70
+ with:
71
+ node-version: 14
72
+ - name: Install Dependencies using Yarn
73
+ run: yarn install
74
+ - name: Build
75
+ run: yarn build
76
+ - name: Release
77
+ run: echo "//registry.npmjs.org/:_authToken=${{secrets.NODE_AUTH_TOKEN}}" > ~/.npmrc && TAG=${GITHUB_REF#"refs/tags/"} npm run release
0 commit comments