diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a51ddc52..62ff88c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -131,19 +131,3 @@ jobs: --target ${{ steps.extract_branch.outputs.branch }}\ --prerelease fi - - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v4 - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v5 - with: - distribution: goreleaser - version: '~> v1' - args: release --clean - workdir: ./cyctl - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..eecab0a2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: goreleaser + +on: + pull_request: + push: + tags: + - "*" + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v4 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + with: + distribution: goreleaser + version: latest + args: release --clean + workdir: ./cyctl + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}