Skip to content

Commit 240b52b

Browse files
authored
ci: Updated ci steps to publish token. (#56)
1 parent 2eaa6e5 commit 240b52b

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

.github/workflows/github-publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: github-publish
22

33
on:
4+
workflow_dispatch:
45
push:
56
tags:
67
- 'v*.*.*'
@@ -11,10 +12,10 @@ jobs:
1112
runs-on: ubuntu-latest
1213
steps:
1314
- name: Checkout repository
14-
uses: actions/checkout@master
15-
- uses: actions/setup-node@v1
15+
uses: actions/checkout@v3
16+
- uses: actions/setup-node@v3
1617
with:
17-
node-version: "12.x"
18+
node-version: 14
1819
registry-url: "https://npm.pkg.github.com"
1920
scope: "@hitz-group"
2021
- name: Install Node Dependencies

.github/workflows/npm-publish.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
11
name: npm-publish
22
on:
33
push:
4-
branches:
5-
- master
4+
tags:
5+
- 'v*.*.*'
6+
67
jobs:
78
npm-publish:
89
name: npm-publish
910
runs-on: ubuntu-latest
1011
steps:
1112
- name: Checkout repository
12-
uses: actions/checkout@v2
13+
uses: actions/checkout@v3
14+
- uses: actions/setup-node@v3
1315
with:
14-
token: ${{ secrets.DEPLOYMENT_TOKEN }}
16+
node-version: 14
17+
registry-url: https://registry.npmjs.org/
1518
- name: Install Node Dependencies
1619
run: yarn install
1720
- name: Build packages
1821
run: yarn build
1922
env:
2023
CI: "TRUE"
21-
- name: Publish if version has been updated
22-
uses: pascalgn/npm-publish-action@06e0830ea83eea10ed4a62654eeaedafb8bf50fc
23-
with: # All of theses inputs are optional
24-
tag_name: "v%s"
25-
tag_message: "v%s"
26-
commit_pattern: "^Release (\\S+)"
27-
workspace: "."
24+
- name: Publish package
25+
run: npm publish --access public
2826
env:
29-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30-
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
27+
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

0 commit comments

Comments
 (0)