forked from commitizen/cz-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(release): defined a github workflow to release with semantic-relea…
…se (commitizen#923)
- Loading branch information
1 parent
475354a
commit 5c5babc
Showing
1 changed file
with
9 additions
and
20 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 |
---|---|---|
@@ -1,31 +1,20 @@ | ||
name: Release | ||
on: | ||
"on": | ||
push: | ||
branches: | ||
- main | ||
- master | ||
jobs: | ||
release: | ||
name: Release | ||
name: release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
cache: npm | ||
node-version: lts/* | ||
- name: Git Config | ||
run: git config --global user.email "[email protected]" && git config --global user.name "Your Name" | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Test | ||
run: npm test | ||
- name: Build | ||
run: npm run build | ||
- name: Release | ||
- run: npm clean-install | ||
- run: npx semantic-release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npx semantic-release | ||
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} |