diff --git a/.github/workflows/goreleaser.yaml b/.github/workflows/goreleaser.yaml new file mode 100644 index 0000000..7aa9a5b --- /dev/null +++ b/.github/workflows/goreleaser.yaml @@ -0,0 +1,46 @@ +name: goreleaser +on: + push: + branches: + - main + tags: + - v** +jobs: + release-kubectl-artillery-plugin: + runs-on: ubuntu-latest + + permissions: + contents: write + packages: write + + steps: + - name: Checkout repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Fetch all tags + run: git fetch --force --tags + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.18 + + - name: Cache Go modules + uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + if: success() && startsWith(github.ref, 'refs/tags/') + with: + distribution: goreleaser + version: latest + args: release --debug --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 0ac5f92..3943108 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -73,7 +73,7 @@ archives: - LICENSE.txt wrap_in_directory: "true" gomod: - proxy: true + proxy: false checksum: name_template: 'checksums.txt' snapshot: