Skip to content

Commit

Permalink
ci: Updated ci steps to publish token. (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
NalinSajwan authored Mar 17, 2023
1 parent 2eaa6e5 commit 240b52b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/github-publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: github-publish

on:
workflow_dispatch:
push:
tags:
- 'v*.*.*'
Expand All @@ -11,10 +12,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
- uses: actions/setup-node@v1
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "12.x"
node-version: 14
registry-url: "https://npm.pkg.github.com"
scope: "@hitz-group"
- name: Install Node Dependencies
Expand Down
23 changes: 10 additions & 13 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
name: npm-publish
on:
push:
branches:
- master
tags:
- 'v*.*.*'

jobs:
npm-publish:
name: npm-publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
token: ${{ secrets.DEPLOYMENT_TOKEN }}
node-version: 14
registry-url: https://registry.npmjs.org/
- name: Install Node Dependencies
run: yarn install
- name: Build packages
run: yarn build
env:
CI: "TRUE"
- name: Publish if version has been updated
uses: pascalgn/npm-publish-action@06e0830ea83eea10ed4a62654eeaedafb8bf50fc
with: # All of theses inputs are optional
tag_name: "v%s"
tag_message: "v%s"
commit_pattern: "^Release (\\S+)"
workspace: "."
- name: Publish package
run: npm publish --access public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

0 comments on commit 240b52b

Please sign in to comment.