Skip to content

Commit

Permalink
Merge pull request #1278 from valor-software/github-actions-add-on-re…
Browse files Browse the repository at this point in the history
…lease

feat(gh-actions): added autopromote npm to latest on gh-release
  • Loading branch information
lexasq authored Jul 16, 2024
2 parents 500b8bc + 033026d commit aa2e801
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/on-gh-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: on-gh-release
on:
release:
types: [released]
branches:
- development

env:
NX_BRANCH: ${{ github.event.number }}
NX_RUN_GROUP: ${{ github.run_id }}
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}
MOZ_HEADLESS: 1
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
# one run
one_run:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ secrets.GITHUB_TOKEN }}

# update npm tags
npm_tag_update:
runs-on: ubuntu-latest
needs: one_run
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- name: get-npm-version
id: package-version
uses: martinbeentjes/[email protected]
- run: |
npm config set registry https://registry.npmjs.org/
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
npm dist-tag add ng2-file-upload@${{ steps.package-version.outputs.current-version }} latest

0 comments on commit aa2e801

Please sign in to comment.