From b43906ccbd4baa1f30ab89b604376043d04d23e9 Mon Sep 17 00:00:00 2001 From: Tanner Stirrat Date: Fri, 4 Oct 2024 10:33:34 -0600 Subject: [PATCH] Add currently-enabled workflow to release windows Remove arm64 target Remove emulator for arm64 target Get rid of unsupported buildx Check out the ref associated with 1.37 to make goreleaser happy Add authors tag for nuget packaging Add authors tag Remove duplicate Add verbose output to debug Debug nuspec package contents Add continue-after-error for debug Prepend version with v Cat out goreleaser config too Fix the ref checked out by the action Remove pin entirely Remove debug and add validation skip Publish v1.38 Use 1.37.2 instad Fix tags Change checksum filename for windows Typo Dedupe Revert changes to release process --- .github/workflows/release-windows.yaml | 37 ++++++++++++++++++++++++++ .github/workflows/release.yaml | 4 +-- .goreleaser.windows.yml | 7 +++-- 3 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/release-windows.yaml diff --git a/.github/workflows/release-windows.yaml b/.github/workflows/release-windows.yaml new file mode 100644 index 0000000000..e6a24e0794 --- /dev/null +++ b/.github/workflows/release-windows.yaml @@ -0,0 +1,37 @@ +--- +name: "Release for Windows" +on: # yamllint disable-line rule:truthy + push: + tags: + - "*" +permissions: + contents: "write" + packages: "write" +jobs: + release-windows: + runs-on: "windows-latest" + steps: + - uses: "actions/checkout@v4" + with: + fetch-depth: 0 + - uses: "authzed/actions/setup-go@main" + - uses: "nowsprinting/check-version-format-action@v4" + id: "version" + with: + prefix: "v" + - uses: "authzed/actions/docker-login@main" + with: + quayio_token: "${{ secrets.QUAYIO_PASSWORD }}" + github_token: "${{ secrets.GITHUB_TOKEN }}" + dockerhub_token: "${{ secrets.DOCKERHUB_ACCESS_TOKEN }}" + - uses: "goreleaser/goreleaser-action@v6" + with: + distribution: "goreleaser-pro" + # NOTE: keep in sync with goreleaser version in other job. + # github actions don't allow yaml anchors. + version: "v2.3.2" + args: "release --clean --config=.goreleaser.windows.yml" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + GORELEASER_KEY: "${{ secrets.GORELEASER_KEY }}" + CHOCOLATEY_API_KEY: "${{ secrets.CHOCOLATEY_API_KEY }}" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fd5b37704d..ed9a30704f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -35,7 +35,7 @@ jobs: distribution: "goreleaser-pro" # NOTE: keep in sync with goreleaser version in other job. # github actions don't allow yaml anchors. - version: "2.3.2" + version: "v2.3.2" args: "release --clean --config=.goreleaser.windows.yml" env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" @@ -73,7 +73,7 @@ jobs: distribution: "goreleaser-pro" # NOTE: keep in sync with goreleaser version in other job. # github actions don't allow yaml anchors. - version: "2.3.2" + version: "v2.3.2" args: "release --clean" env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.goreleaser.windows.yml b/.goreleaser.windows.yml index 71d0019197..f8fe5f9d49 100644 --- a/.goreleaser.windows.yml +++ b/.goreleaser.windows.yml @@ -14,7 +14,6 @@ builds: - "windows" goarch: - "amd64" - - "arm64" mod_timestamp: "{{ .CommitTimestamp }}" ldflags: - "-s -w" @@ -27,6 +26,7 @@ archives: format_overrides: - goos: "windows" format: "zip" + chocolateys: - name: "spicedb" package_source_url: "https://github.com/authzed/spicedb" @@ -36,6 +36,7 @@ chocolateys: url_template: "https://github.com/authzed/spicedb/releases/download/{{ .Tag }}/{{ .ArtifactName }}" icon_url: "https://authzed.com/favicon.svg" copyright: "2024 AuthZed, Inc" + authors: "SpiceDB Contributors" license_url: "https://github.com/authzed/spicedb/blob/main/LICENSE" project_source_url: "https://github.com/authzed/spicedb" docs_url: "https://authzed.com/docs" @@ -48,7 +49,9 @@ chocolateys: api_key: "{{ .Env.CHOCOLATEY_API_KEY }}" source_repo: "https://push.chocolatey.org/" checksum: - name_template: "checksums.txt" + # NOTE: this needs to be different from the main release step + # because the main release already generates this file in a separate step. + name_template: "windows_checksums.txt" snapshot: version_template: "{{ incpatch .Version }}-next" nightly: