Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated npm publish #97

Merged
merged 6 commits into from
Nov 9, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
updated npm publish
  • Loading branch information
ioanSflt committed Nov 9, 2021
commit a0b0b5ef0db59499a3c8f24afebafdb088f74727
51 changes: 39 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,39 @@ jobs:
- run: yarn test

publish:
timeout-minutes: 5
runs-on: ubuntu-latest
needs: [ build, test ]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Install node
uses: actions/setup-node@v2
with:
node-version: '16.13.0'
registry-url: "https://npm.pkg.github.com"
# Defaults to the user or organization that owns the workflow file
scope: "@zondax"
- name: Install yarn
run: npm install -g yarn
- name: Install modules
run: yarn install
- name: Build package
run: yarn build
- name: Get latest release version number
id: get_version
uses: battila7/get-version-action@v2
- name: Update tag
run: npm --no-git-tag-version version ${{ steps.get_version.outputs.version }}
- name: Publish package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}


publish_npm_package:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -56,13 +89,12 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: '16.13.0'
registry-url: "https://registry.npmjs.org"
registry-url: "https://npm.pkg.github.com"
jleni marked this conversation as resolved.
Show resolved Hide resolved
scope: "@zondax"
- name: Install yarn
run: npm install -g yarn
- name: Build package
run: |
cd js
yarn install
yarn build
- name: Get latest release version number
Expand All @@ -76,15 +108,10 @@ jobs:
with:
output_name: version
value: ${{ steps.get_version.outputs.version }}
index_of_str: "npm_"
- name: Update tag
run: |
cd js
echo Publishing as ${{ steps.get_version_cleaned.outputs.version }}
npm --allow-same-version --no-git-tag-version version ${{ steps.get_version_cleaned.outputs.version }}
index_of_str: "npm_v"
- name: Update tag
run: npm --no-git-tag-version version ${{ steps.get_version.outputs.version }}
- name: Publish package
run: |
cd js
npm publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_PUBLISH_AUTO }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_PUBLISH_AUTO }}