Commit 6ebfb426 authored by suyanlong's avatar suyanlong Committed by 33cn

fix: Adjust github action

parent 7b5bd4f6
......@@ -33,21 +33,13 @@ jobs:
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/exec
@semantic-release/changelog
@semantic-release/git
env:
......
# This is a basic workflow that is manually triggered
name: manually make bin for all branch
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on: [push,pull_request]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
automake:
name: automake
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
- name: compile binary
run: make all-arch
- name : Upload artifact bin
uses: actions/upload-artifact@v2
with:
name: chain33-artifact
path: |
build/*.tar.gz
build/*.zip
......@@ -23,21 +23,13 @@ jobs:
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/exec
@semantic-release/changelog
@semantic-release/git
env:
......@@ -51,4 +43,3 @@ jobs:
echo ${{ steps.semantic.outputs.new_release_minor_version }}
echo ${{ steps.semantic.outputs.new_release_patch_version }}
......@@ -47,4 +47,5 @@ build/parawallet/
build/sendstock
build/sendstock.toml
build/*.csv
build/CHANGELOG.md
plugin/dapp/dex/boss/build/
......@@ -10,8 +10,14 @@
# "@semantic-release/github", #Default 4
[
"@semantic-release/github",
{"assets": ["build/*.tar"]}
{"assets": ["build/*.tar.gz","build/*.zip"]}
],
"@semantic-release/git",
[
"@semantic-release/exec", {
"prepareCmd": "make all-arch"
}
]
]
}
......@@ -40,37 +40,37 @@ PLATFORM_LIST = \
WINDOWS_ARCH_LIST = \
windows-amd64
GOBUILD=go build $(BUILD_FLAGS) $(LDFLAGS)
GOBUILD=go build $(BUILD_FLAGS)" -w -s"
darwin-amd64:
GOARCH=amd64 GOOS=darwin $(GOBUILD) -o $(APP)-$@ $(SRC)
GOARCH=amd64 GOOS=darwin $(GOBUILD) -o $(CLI)-$@ $(SRC_CLI)
cp chain33.para.toml chain33.toml build/ && cd build && \
cp chain33.para.toml chain33.toml CHANGELOG.md build/ && cd build && \
chmod +x chain33-darwin-amd64 && \
chmod +x chain33-cli-darwin-amd64 && \
tar -zcvf chain33-darwin-amd64.tar chain33-darwin-amd64 chain33-cli-darwin-amd64 chain33.para.toml chain33.toml
tar -zcvf chain33-darwin-amd64.tar.gz chain33-darwin-amd64 chain33-cli-darwin-amd64 chain33.para.toml chain33.toml CHANGELOG.md
darwin-arm64:
GOARCH=arm64 GOOS=darwin $(GOBUILD) -o $(APP)-$@ $(SRC)
GOARCH=arm64 GOOS=darwin $(GOBUILD) -o $(CLI)-$@ $(SRC_CLI)
cp chain33.para.toml chain33.toml build/ && cd build && \
cp chain33.para.toml chain33.toml CHANGELOG.md build/ && cd build && \
chmod +x chain33-darwin-arm64 && \
chmod +x chain33-cli-darwin-arm64 && \
tar -zcvf chain33-darwin-arm64.tar chain33-darwin-arm64 chain33-cli-darwin-arm64 chain33.toml chain33.para.toml
tar -zcvf chain33-darwin-arm64.tar.gz chain33-darwin-arm64 chain33-cli-darwin-arm64 chain33.toml chain33.para.toml CHANGELOG.md
linux-amd64:
GOARCH=amd64 GOOS=linux $(GOBUILD) -o $(APP)-$@ $(SRC)
GOARCH=amd64 GOOS=linux $(GOBUILD) -o $(CLI)-$@ $(SRC_CLI)
cp chain33.para.toml chain33.toml build/ && cd build && \
cp chain33.para.toml chain33.toml CHANGELOG.md build/ && cd build && \
chmod +x chain33-linux-amd64 && \
chmod +x chain33-cli-linux-amd64 && \
tar -zcvf chain33-linux-amd64.tar chain33-linux-amd64 chain33-cli-linux-amd64 chain33.para.toml chain33.toml
tar -zcvf chain33-linux-amd64.tar.gz chain33-linux-amd64 chain33-cli-linux-amd64 chain33.para.toml chain33.toml CHANGELOG.md
windows-amd64:
GOARCH=amd64 GOOS=windows $(GOBUILD) -o $(APP)-$@.exe $(SRC)
GOARCH=amd64 GOOS=windows $(GOBUILD) -o $(CLI)-$@.exe $(SRC_CLI)
cp chain33.para.toml chain33.toml build/ && cd build && \
tar -zcvf chain33-windows-amd64.tar chain33-windows-amd64.exe chain33-cli-windows-amd64.exe chain33.para.toml chain33.toml
cp chain33.para.toml chain33.toml CHANGELOG.md build/ && cd build && \
zip -j chain33-windows-amd64.zip chain33-windows-amd64.exe chain33-cli-windows-amd64.exe chain33.para.toml chain33.toml CHANGELOG.md
all-arch: $(PLATFORM_LIST) $(WINDOWS_ARCH_LIST)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment