-
-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub Actions Release script; (#5384)
* chore(ci): Add release-it script; * chore(ci): add github actions release script;
- Loading branch information
1 parent
493e04c
commit 45b29db
Showing
3 changed files
with
58 additions
and
26 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,55 @@ | ||
name: Release Axios | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
type: | ||
type: choice | ||
description: Choose release type | ||
options: | ||
- auto | ||
- patch | ||
- minor | ||
- major | ||
default: auto | ||
beta: | ||
type: boolean | ||
description: Prerelease | ||
default: false | ||
npm: | ||
type: boolean | ||
description: NPM release | ||
default: true | ||
dry: | ||
type: boolean | ||
description: Dry release | ||
default: false | ||
jobs: | ||
releaseIt: | ||
runs-on: ubuntu-latest | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: git config | ||
run: | | ||
git config user.name "${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: npm | ||
- name: npm credentials | ||
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN | ||
- run: npm install | ||
- name: release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TYPE_ARG: ${{ fromJSON('{"auto":"", "patch":"--patch", "minor":"--minor", "major":"--major"}')[github.event.inputs.type] }} | ||
BETA_ARG: ${{ github.event.inputs.beta == true && '--preRelease=beta' || '' }} | ||
NPM_ARG: ${{ github.event.inputs.npm == false && '--no-npm' || '' }} | ||
DRY_ARG: ${{ github.event.inputs.dry == true && '--dry-run' || '' }} | ||
run: npm run release -- --ci --verbose $NPM_ARG $TYPE_ARG $BETA_ARG $DRY_ARG |
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
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