Skip to content

Commit dd2b0ee

Browse files
authored
Merge pull request #2 from sourcetoad/npm-publish
NPM + GPR Publish
2 parents d987b28 + 6f2cfae commit dd2b0ee

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.github/workflows/publish.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55

66
jobs:
77
publish:
8+
environment: production
89
runs-on: ubuntu-latest
910

1011
name: Publish
@@ -16,15 +17,24 @@ jobs:
1617
with:
1718
node-version: 14
1819
cache: 'yarn'
19-
registry-url: 'https://npm.pkg.github.com'
20+
registry-url: 'https://registry.npmjs.org'
2021

2122
- name: Yarn Install
2223
run: yarn install --network-concurrency 1
2324

2425
- name: Build
2526
run: yarn prod
2627

27-
- name: Publish
28+
- name: Publish (NPM)
29+
run: npm publish
30+
env:
31+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
32+
33+
- uses: actions/setup-node@v2
34+
with:
35+
registry-url: 'https://npm.pkg.github.com'
36+
37+
- name: Publish (GPR)
2838
run: npm publish
2939
env:
3040
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
"lint": "eslint src/",
1313
"es-check": "es-check es5 dist/*.js"
1414
},
15-
"publishConfig": {
16-
"registry": "https://npm.pkg.github.com/"
17-
},
1815
"repository": {
1916
"type": "git",
2017
"url": "git://github.com/sourcetoad/retry-session.git"

0 commit comments

Comments
 (0)