From 08785dd875725cbc880e706cfd84161460f212a1 Mon Sep 17 00:00:00 2001 From: Lonny Wong Date: Sat, 6 Jul 2024 07:06:56 +0800 Subject: [PATCH] update github workflows --- .github/workflows/gotest.yml | 21 ++++++++++++++++++--- .github/workflows/publish.yml | 22 ++++++++-------------- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/.github/workflows/gotest.yml b/.github/workflows/gotest.yml index 5f44dc1..654e971 100644 --- a/.github/workflows/gotest.yml +++ b/.github/workflows/gotest.yml @@ -7,7 +7,7 @@ jobs: - name: Checkout trzsz-go uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: "1.20" - name: go test @@ -18,7 +18,7 @@ jobs: - name: Checkout trzsz-go uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: "1.20" - name: go test @@ -29,8 +29,23 @@ jobs: - name: Checkout trzsz-go uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: "1.20" - name: go test run: go test -v -count=1 ./trzsz + go-release-snapshot: + runs-on: ubuntu-latest + steps: + - name: Checkout trzsz-go + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.20" + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: "~> v1" + args: release --clean --snapshot --skip=publish diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6218555..92bd888 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,22 +10,19 @@ jobs: - name: Checkout trzsz-go uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: "1.20" - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v5 + uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser - version: latest + version: "~> v1" args: release --clean --skip=publish - name: Upload Release Assets - uses: trzsz/upload-release-assets@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: softprops/action-gh-release@v2 with: - release_id: ${{ github.event.release.id }} - assets_path: | + files: | dist/*.tar.gz dist/*.zip dist/*.rpm @@ -49,7 +46,7 @@ jobs: uses: actions/checkout@v4 - name: Get trzsz-go version id: trzsz-go-version - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: NO_NEED result-encoding: string @@ -75,9 +72,6 @@ jobs: ./inst/iscc trzsz_windows_x86_64.iss ./inst/iscc trzsz_windows_aarch64.iss - name: Upload Inno Setup Assets - uses: trzsz/upload-release-assets@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: softprops/action-gh-release@v2 with: - release_id: ${{ github.event.release.id }} - assets_path: inno_setup/Output/*.exe + files: inno_setup/Output/*.exe