From a879b2229df0e20a99fc16b3484db507e38ed2a3 Mon Sep 17 00:00:00 2001 From: k1LoW Date: Thu, 25 Jan 2024 23:02:01 +0900 Subject: [PATCH] Fix --- .github/workflows/tagpr.yml | 32 +++++++++++++++++++++----------- .goreleaser/darwin.yml | 2 +- .goreleaser/linux.yml | 2 +- .goreleaser/windows.yml | 2 +- 4 files changed, 24 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tagpr.yml b/.github/workflows/tagpr.yml index 5e9b9023..80b81545 100644 --- a/.github/workflows/tagpr.yml +++ b/.github/workflows/tagpr.yml @@ -50,10 +50,16 @@ jobs: with: distribution: goreleaser version: latest - args: --config .goreleaser/darwin.yml --clean + args: --config .goreleaser/darwin.yml --clean --skip=publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload assets + run: | + gh release upload ${{ needs.tagpr.outputs.tagpr-tag }} dist/tbls_${{ needs.tagpr.outputs.tagpr-tag }}_darwin_arm64.zip dist/tbls_${{ needs.tagpr.outputs.tagpr-tag }}_darwin_amd64.zip dist/checksums-darwin.txt --repo ${{ github.repository }} --clobber + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + linux-assets: needs: tagpr if: needs.tagpr.outputs.tagpr-tag != '' @@ -82,12 +88,12 @@ jobs: docker compose up -d sleep 20s - - name: Run GoReleaser (dry-run) + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 with: distribution: goreleaser version: latest - args: --config .goreleaser/linux.yml --clean --snapshot --skip=publish + args: --config .goreleaser/linux.yml --clean --skip=publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -96,14 +102,11 @@ jobs: env TBLS=dist/tbls-linux_linux_amd64_v1/tbls make depsdev db doc git restore . - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v5 - with: - distribution: goreleaser - version: latest - args: --config .goreleaser/linux.yml --clean + - name: Upload assets + run: | + gh release upload ${{ needs.tagpr.outputs.tagpr-tag }} dist/tbls_${{ needs.tagpr.outputs.tagpr-tag }}_linux_arm64.tar.gz dist/tbls_${{ needs.tagpr.outputs.tagpr-tag }}_linux_amd64.tar.gz dist/checksums-linux.txt --repo ${{ github.repository }} --clobber env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} windows-assets: needs: tagpr @@ -141,10 +144,16 @@ jobs: with: distribution: goreleaser version: latest - args: --config .goreleaser/windows.yml --clean + args: --config .goreleaser/windows.yml --clean --skip=publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload assets + run: | + gh release upload ${{ needs.tagpr.outputs.tagpr-tag }} dist/tbls_${{ needs.tagpr.outputs.tagpr-tag }}_windows_amd64.zip dist/checksums-windows.txt --repo ${{ github.repository }} --clobber + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + dockerimage: needs: tagpr if: needs.tagpr.outputs.tagpr-tag != '' @@ -200,6 +209,7 @@ jobs: org.opencontainers.image.revision=${{ github.sha }} org.opencontainers.image.version=${{ steps.latest_version.outputs.version }} org.opencontainers.image.source=https://github.com/k1LoW/tbls + release: needs: [tagpr, darwin-assets, linux-assets, windows-assets, dockerimage] runs-on: ubuntu-latest diff --git a/.goreleaser/darwin.yml b/.goreleaser/darwin.yml index 1c307892..91ac8ef7 100644 --- a/.goreleaser/darwin.yml +++ b/.goreleaser/darwin.yml @@ -39,4 +39,4 @@ changelog: - '^test:' release: draft: true - replace_existing_draft: true + skip_upload: true diff --git a/.goreleaser/linux.yml b/.goreleaser/linux.yml index ac9eb48d..c31a0542 100644 --- a/.goreleaser/linux.yml +++ b/.goreleaser/linux.yml @@ -66,4 +66,4 @@ nfpms: epoch: 1 release: draft: true - replace_existing_draft: true + skip_upload: true diff --git a/.goreleaser/windows.yml b/.goreleaser/windows.yml index 752823e3..ce14b1bd 100644 --- a/.goreleaser/windows.yml +++ b/.goreleaser/windows.yml @@ -45,4 +45,4 @@ changelog: - '^test:' release: draft: true - replace_existing_draft: true + skip_upload: true