Skip to content

Commit

Permalink
build: github actions change
Browse files Browse the repository at this point in the history
  • Loading branch information
alisahinozcelik committed Nov 25, 2023
1 parent ce59cc3 commit f8d6ab1
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,28 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm i
- run: node_modules/.bin/nx run ng-utils:build
- run: cd ./dist/libs/ng-utils && npm version 17${{github.ref_name}} --no-git-tag-version
- uses: actions/upload-artifact@v3
with:
name: package-v17
path: dist/libs/ng-utils/

publish:
runs-on: ubuntu-latest
needs: [prepare-v17]
steps:
- uses: actions/download-artifact@v3
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Publish Version 17
run: cd ./package-v17 && npm publish --tag v17-lts
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Add Latest Tag to v17
run: cd ./package-v17 && npm dist-tag add @thalesrc/ng-utils@$(perl -ne 'print "$1" if /"version":\s?"(.*?)"/' ./package.json) latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit f8d6ab1

Please sign in to comment.