fix ci
CI / Build binary CI (push) Waiting to run Details

This commit is contained in:
huoxue 2023-12-29 17:11:52 +08:00
parent c16fb8c252
commit 0519732280
1 changed files with 15 additions and 12 deletions

View File

@ -23,9 +23,15 @@ jobs:
with:
fetch-depth: 0
- name: setup go
uses: https://gh.huoxue.store/actions/setup-go@v4
with:
go-version: '1.20'
wget https://studygolang.com/dl/golang/go1.21.3.linux-amd64.tar.gz
tar -xzf ./go1.21.3.linux-amd64.tar.gz -C /usr/local
echo 'export GOROOT=/usr/local/go' >> $GITHUB_ENV
ln -s /usr/local/go/bin/go /usr/bin/go
wget https://huoxue.link:12300/api/packages/huoxue1/generic/goreleaser/amd64_latest/goreleaser.tar.gz
tar -xzvf ./goreleaser.tar.gz -C /usr/local
rm ./go1.21.3.linux-amd64.tar.gz
rm ./goreleaser.tar.gz
ln -s /usr/local/goreleaser /usr/bin/goreleaser
- name: Fetch all tags
run: git fetch --force --tags
- name: Check snapshot
@ -34,19 +40,16 @@ jobs:
run: echo '::set-output name=ARG::--snapshot'
- name: push release
if: "startsWith(github.ref, 'refs/tags/')"
id: push release
uses: https://huoxue.link:12300/huoxue1/goreleaser-action@master
with:
version: latest
args: release --timeout 5h30m --rm-dist
run: |
export GITEA_TOKEN=${{ secrets.TOKEN }}
goreleaser release --timeout 5h30m --clean
env:
GITEA_TOKEN: ${{ secrets.TOKEN }}
- name: Run GoReleaser
if: "!startsWith(github.ref, 'refs/tags/')"
uses: https://huoxue.link:12300/huoxue1/goreleaser-action@master
with:
version: latest
args: build --snapshot --timeout 5h30m --clean
run: |
export GITEA_TOKEN=${{ secrets.TOKEN }}
goreleaser build --snapshot --timeout 5h30m --clean
env:
GITEA_TOKEN: ${{ secrets.TOKEN }}
- name: Set up QEMU