Skip to content

Commit

Permalink
release: Split draft and NPM release workflows. (#1289)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpfleming authored Aug 14, 2024
1 parent fc9549b commit 436ce1f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: NPM Release
on:
workflow_dispatch:
release:
types:
- published
jobs:
npm_release:
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Fetch unshallow repo"
run: git fetch --prune --unshallow
- name: Update npm packages to latest version
working-directory: ./npm/@fastly/cli
run: npm install && npm version "${{ github.ref_name }}" --allow-same-version
- name: Publish npm packages
working-directory: ./npm/@fastly
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: for dir in *; do (echo $dir && cd $dir && npm publish); done
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: Draft Release from Tag
on:
workflow_dispatch:
push:
Expand Down Expand Up @@ -46,11 +46,3 @@ jobs:
GOHOSTOS: ${{ env.GOHOSTOS }}
GOHOSTARCH: ${{ env.GOHOSTARCH }}
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
- name: Update npm packages to latest version
working-directory: ./npm/@fastly/cli
run: npm install && npm version "${{ github.ref_name }}" --allow-same-version
- name: Publish npm packages
working-directory: ./npm/@fastly
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: for dir in *; do (echo $dir && cd $dir && npm publish); done

0 comments on commit 436ce1f

Please sign in to comment.