-
Notifications
You must be signed in to change notification settings - Fork 997
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add workflow for release from prerelease (#6559)
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Publish NPM Latest From Prerelease | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
CAP_GH_RELEASE_TOKEN: | ||
required: true | ||
NPM_TOKEN: | ||
required: true | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
jobs: | ||
deploy-npm-latest: | ||
if: github.ref == 'refs/heads/main' | ||
runs-on: macos-12 | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.CAP_GH_RELEASE_TOKEN }} | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
registry-url: https://registry.npmjs.org/ | ||
cache: npm | ||
cache-dependency-path: '**/package.json' | ||
- run: | | ||
npm install | ||
- name: Version & Publish | ||
env: | ||
GH_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: | | ||
git config user.name "Github Workflow (on behalf of ${{ github.actor }})" | ||
git config user.email "users.noreply.github.com" | ||
npm whoami | ||
npm run ci:publish:latest-from-pre |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters