Skip to content

Commit 9a3f4d7

Browse files
committed
Workflow for npm publish got included!
1 parent 5b969b0 commit 9a3f4d7

File tree

2 files changed

+47
-5
lines changed

2 files changed

+47
-5
lines changed

.github/workflows/npm-publish.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3+
4+
name: '@smakss/convert-numbers'
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: 12
18+
19+
publish-npm:
20+
needs: build
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: actions/setup-node@v1
25+
with:
26+
node-version: 12
27+
registry-url: https://registry.npmjs.org/
28+
scope: '@smakss'
29+
- run: npm publish
30+
env:
31+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
32+
33+
publish-gpr:
34+
needs: build
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v2
38+
- uses: actions/setup-node@v1
39+
with:
40+
node-version: 12
41+
registry-url: https://npm.pkg.github.com/
42+
scope: '@smakss'
43+
- run: npm publish
44+
env:
45+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@smakss/random-string",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "Generates random dummy string with random length.",
55
"type": "module",
66
"main": "index.cjs",
@@ -28,8 +28,5 @@
2828
"bugs": {
2929
"url": "https://github.com/SMAKSS/random-string/issues"
3030
},
31-
"homepage": "https://github.com/SMAKSS/random-string#readme",
32-
"publishConfig": {
33-
"registry": "https://npm.pkg.github.com"
34-
}
31+
"homepage": "https://github.com/SMAKSS/random-string#readme"
3532
}

0 commit comments

Comments
 (0)