From cf67f6cf64319b439ddb799061f09a4664d060e9 Mon Sep 17 00:00:00 2001 From: Johan Siebens Date: Sat, 23 Dec 2023 07:29:58 +0100 Subject: [PATCH] chore: update workflows and goreleaser --- .github/workflows/build.yaml | 5 ++-- .github/workflows/integration.yaml | 5 ++-- .github/workflows/nightly.yaml | 42 ------------------------------ .github/workflows/release.yaml | 16 ++++++------ .goreleaser.yaml | 7 +++-- 5 files changed, 17 insertions(+), 58 deletions(-) delete mode 100644 .github/workflows/nightly.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 716547e..b8f74fd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -27,9 +27,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version-file: 'go.mod' + cache: true - name: Build run: | go test -v -short ./... diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index 7162e3d..01c13bd 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -24,9 +24,10 @@ jobs: with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version-file: 'go.mod' + cache: true - name: Run Integration Tests run: | go test -v ./tests \ No newline at end of file diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml deleted file mode 100644 index c6291c4..0000000 --- a/.github/workflows/nightly.yaml +++ /dev/null @@ -1,42 +0,0 @@ -name: nightly - -on: workflow_dispatch - -permissions: - contents: write - packages: write - id-token: write - -jobs: - release: - runs-on: ubuntu-latest - env: - DOCKER_CLI_EXPERIMENTAL: "enabled" - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Docker Login - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: "1.20" - - name: Install cosign - uses: sigstore/cosign-installer@v2.8.1 - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 - with: - distribution: goreleaser-pro - version: latest - args: release --nightly --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9ead28c..f8c6ce7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,7 +3,7 @@ name: release on: push: tags: - - '*' + - 'v*' permissions: contents: write @@ -29,17 +29,17 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version-file: 'go.mod' + cache: true - name: Install cosign - uses: sigstore/cosign-installer@v2.8.1 + uses: sigstore/cosign-installer@v3.1.1 - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v5 with: - distribution: goreleaser-pro + distribution: goreleaser version: latest args: release --rm-dist env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 858e1ed..c287379 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,8 +1,5 @@ project_name: ionscale -nightly: - name_template: '{{ incminor .Version }}-dev' - before: hooks: - go mod tidy @@ -44,7 +41,7 @@ docker_manifests: image_templates: - ghcr.io/jsiebens/{{ .ProjectName }}:{{ .Version }}-amd64 - ghcr.io/jsiebens/{{ .ProjectName }}:{{ .Version }}-arm64 - - name_template: ghcr.io/jsiebens/{{ .ProjectName }}:{{ if .IsNightly }}dev{{ else }}latest{{ end }} + - name_template: ghcr.io/jsiebens/{{ .ProjectName }}:latest image_templates: - ghcr.io/jsiebens/{{ .ProjectName }}:{{ .Version }}-amd64 - ghcr.io/jsiebens/{{ .ProjectName }}:{{ .Version }}-arm64 @@ -59,6 +56,7 @@ signs: - '--output-certificate=${certificate}' - '--output-signature=${signature}' - '${artifact}' + - '--yes' artifacts: checksum docker_signs: @@ -70,6 +68,7 @@ docker_signs: args: - sign - '${artifact}' + - '--yes' archives: - format: binary