From 10d6f8435900ee64f7a186b964f21ddf4342bfcd Mon Sep 17 00:00:00 2001 From: yzqzss Date: Sun, 9 Jun 2024 03:42:54 +0800 Subject: [PATCH] fast build? --- .gitea/workflows/release.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index e441a36..1e7e2c0 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -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}}'