fast build?
All checks were successful
Gitea Actions Demo / Release Go Binary (386, linux) (push) Successful in 31s
Gitea Actions Demo / Release Go Binary (386, windows) (push) Successful in 33s
Gitea Actions Demo / Release Go Binary (amd64, linux) (push) Successful in 29s
Gitea Actions Demo / Release Go Binary (amd64, darwin) (push) Successful in 32s
Gitea Actions Demo / Release Go Binary (arm64, darwin) (push) Successful in 28s
Gitea Actions Demo / Release Go Binary (amd64, windows) (push) Successful in 31s
Gitea Actions Demo / Release Go Binary (arm64, linux) (push) Successful in 25s

This commit is contained in:
yzqzss 2024-06-09 03:42:54 +08:00
parent 1ea44bd412
commit 10d6f84359

View File

@ -21,10 +21,6 @@ jobs:
goos: windows
steps:
- uses: actions/checkout@v4
- name: setup go
uses: actions/setup-go@v5
with:
go-version: '>=1.22.3'
- uses: wangyoucao577/go-release-action@v1
id: go-release-action
with:
@ -35,10 +31,20 @@ jobs:
project_path: ./cmd/...
upload: false
# output is release_asset_dir
- name: release-action
id: release-action
uses: https://gitea.com/actions/release-action@main
- name: rename artifact
# append os and arch to the artifact name (handle windows .exe)
run: |
cd ${{ steps.go-release-action.outputs.release_asset_dir }}
for f in *; do
if [[ $f == *.exe ]]; then
noextname=$(basename "$f" .exe)
mv "$f" "${noextname}-${{ matrix.goos }}-${{ matrix.goarch }}.exe"
else
mv "$f" "${f}-${{ matrix.goos }}-${{ matrix.goarch }}"
fi
done
cd -
- uses: akkuman/gitea-release-action@v1
with:
files: |-
${{ steps.go-release-action.outputs.release_asset_dir }}/**
api_key: '${{secrets.RELEASE_TOKEN}}'