Skip to content

Commit 28febf7

Browse files
suyanlongvipwzw
authored andcommitted
fix: fix ci and add manually auto publish release
1 parent 1e1cd2f commit 28febf7

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

.github/workflows/automake.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# This is a basic workflow that is manually triggered
2+
name: manually auto publish release
3+
4+
# Controls when the action will run. Workflow runs when manually triggered using the UI
5+
# or API.
6+
on:
7+
workflow_dispatch:
8+
# Inputs the workflow accepts.
9+
inputs:
10+
name:
11+
# Friendly description to be shown in the UI instead of 'name'
12+
description: 'auto make'
13+
# Default value if no value is explicitly provided
14+
default: 'push'
15+
# Input has to be provided for the workflow to run
16+
required: true
17+
18+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
19+
jobs:
20+
automake:
21+
name: automake
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Set up Golang env
25+
uses: actions/setup-go@v2
26+
with:
27+
go-version: 1.17
28+
id: go
29+
30+
- name: checkout repo
31+
uses: actions/checkout@v2
32+
with:
33+
fetch-depth: 0
34+
persist-credentials: false # <--- this
35+
36+
- name: compile binary
37+
run: make all-arch
38+
39+
- name : Upload artifact bin
40+
uses: actions/upload-artifact@v2
41+
with:
42+
name: chain33-artifact
43+
path: build/*.tar
44+
45+
- name: Semantic Release
46+
uses: cycjimmy/semantic-release-action@v2
47+
id: semantic
48+
with:
49+
branch: master
50+
extra_plugins: |
51+
@semantic-release/changelog
52+
@semantic-release/git
53+
env:
54+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
55+
56+
- name: Do something when a new release published
57+
if: steps.semantic.outputs.new_release_published == 'true'
58+
run: |
59+
echo ${{ steps.semantic.outputs.new_release_version }}
60+
echo ${{ steps.semantic.outputs.new_release_major_version }}
61+
echo ${{ steps.semantic.outputs.new_release_minor_version }}
62+
echo ${{ steps.semantic.outputs.new_release_patch_version }}

0 commit comments

Comments
 (0)