-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
06e6b67
commit 84c7990
Showing
3 changed files
with
60 additions
and
9 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
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,56 @@ | ||
name: Release | ||
|
||
concurrency: | ||
group: release | ||
cancel-in-progress: false | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
type: | ||
description: release type | ||
required: true | ||
type: choice | ||
default: patch | ||
options: | ||
- patch | ||
- minor | ||
- major | ||
|
||
jobs: | ||
release: | ||
name: Release pushed tag | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: bump version | ||
shell: bash | ||
run: npm version ${{inputs.type}} | ||
- name: Get Package version | ||
id: version | ||
uses: zoexx/github-action-json-file-properties@release | ||
with: | ||
file_path: 'package.json' | ||
prop_path: 'version' | ||
- name: commit to main | ||
shell: bash | ||
env: | ||
CI_COMMIT_MESSAGE: 'feat: released a new version' | ||
CI_COMMIT_AUTHOR: Continuous Integration | ||
run: | | ||
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" | ||
git config --global user.email "[email protected]" | ||
git add . | ||
git commit -m "${{env.CI_COMMIT_MESSAGE}}" | ||
git tag -a ${{steps.version}} head -m "chore: released vserion ${{steps.version}}" | ||
git push origin main | ||
git push --tags | ||
- name: Create release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} | ||
tag: main | ||
run: | | ||
gh release create "${{steps.version}}" \ | ||
--title="Released Artifact ${{steps.version}}" \ | ||
--generate-notes \ | ||
--verify-tag | ||
--draft |
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