Skip to content

Commit e20ad78

Browse files
authored
feat: automatic update npm to latest on github release (#6658)
* 13.0.0 * 14.0.0 * 15.0.0 * 16.0.0 * 17.0.0 * 18.0.0 * chore: version of the lib synced with the version of the angular * chore: added automatic assign of latest version on github release * chore(ci): changed trigger to on released
1 parent 3acd888 commit e20ad78

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/on-gh-release.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: on-gh-release
2+
on:
3+
release:
4+
types: [released]
5+
6+
env:
7+
NX_BRANCH: ${{ github.event.number }}
8+
NX_RUN_GROUP: ${{ github.run_id }}
9+
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}
10+
MOZ_HEADLESS: 1
11+
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
13+
jobs:
14+
# one run
15+
one_run:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Cancel Previous Runs
19+
uses: styfle/[email protected]
20+
with:
21+
access_token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
# update npm tags
24+
npm_tag_update:
25+
runs-on: ubuntu-latest
26+
needs: build
27+
steps:
28+
- uses: actions/checkout@v3
29+
- uses: actions/cache@v3
30+
- name: get-npm-version
31+
id: package-version
32+
uses: martinbeentjes/[email protected]
33+
- run: |
34+
npm config set registry https://registry.npmjs.org/
35+
npm config set _authToken=${{ secrets.NPM_TOKEN }}
36+
npm dist-tag add ngx-bootstrap@${{ steps.package-version.outputs.current-version}} latest

0 commit comments

Comments
 (0)