-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: šversion control: Add github action for auto publish release andā¦
ā¦ tag version
- Loading branch information
Showing
4 changed files
with
113 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,54 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Golang env | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
id: go | ||
|
||
- name: checkout repo | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false # <--- this | ||
|
||
- name: compile binary | ||
run: make all-arch | ||
|
||
- name : Upload artifact bin | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: chain33-artifact | ||
path: build/*.tar | ||
|
||
- name: Semantic Release | ||
uses: cycjimmy/semantic-release-action@v2 | ||
id: semantic | ||
with: | ||
branch: master | ||
extra_plugins: | | ||
@semantic-release/changelog | ||
@semantic-release/git | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Do something when a new release published | ||
if: steps.semantic.outputs.new_release_published == 'true' | ||
run: | | ||
echo ${{ steps.semantic.outputs.new_release_version }} | ||
echo ${{ steps.semantic.outputs.new_release_major_version }} | ||
echo ${{ steps.semantic.outputs.new_release_minor_version }} | ||
echo ${{ steps.semantic.outputs.new_release_patch_version }} | ||
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,17 @@ | ||
{ "branches": ["master", "next"], | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", #Default 1 | ||
"@semantic-release/release-notes-generator", #Default 2 | ||
[ | ||
"@semantic-release/changelog", | ||
{ "changelogFile": "CHANGELOG.md", "changelogTitle": "changelog" }, | ||
], | ||
# "@semantic-release/npm", #Default 3 | ||
# "@semantic-release/github", #Default 4 | ||
[ | ||
"@semantic-release/github", | ||
{"assets": ["build/*.tar"]} | ||
], | ||
"@semantic-release/git", | ||
] | ||
} |
Empty file.
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