Skip to content

Commit

Permalink
Merge pull request #2087 from authzed/fix-windows-release-process
Browse files Browse the repository at this point in the history
Add currently-enabled workflow to release windows
  • Loading branch information
tstirrat15 authored Oct 24, 2024
2 parents fcd2670 + b43906c commit b02eed1
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 4 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release-windows.yaml
Original file line number Diff line number Diff line change
@@ -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 }}"
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down Expand Up @@ -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 }}"
Expand Down
7 changes: 5 additions & 2 deletions .goreleaser.windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ builds:
- "windows"
goarch:
- "amd64"
- "arm64"
mod_timestamp: "{{ .CommitTimestamp }}"
ldflags:
- "-s -w"
Expand All @@ -27,6 +26,7 @@ archives:
format_overrides:
- goos: "windows"
format: "zip"

chocolateys:
- name: "spicedb"
package_source_url: "https://github.com/authzed/spicedb"
Expand All @@ -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"
Expand All @@ -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:
Expand Down

0 comments on commit b02eed1

Please sign in to comment.