Merge pull request #2074 from authzed/register-common-flags #128
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: "Release" | |
on: # yamllint disable-line rule:truthy | |
push: | |
tags: | |
- "*" | |
permissions: | |
contents: "write" | |
packages: "write" | |
jobs: | |
goreleaser-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" | |
- name: "Fail for an invalid version (windows)" | |
if: "${{ !startsWith(github.ref_name, 'v') || steps.version.outputs.is_valid != 'true' }}" | |
run: 'echo "SpiceDB version must start with `v` and be a semver" && exit 1' | |
shell: "bash" | |
- uses: "authzed/actions/docker-login@main" | |
with: | |
quayio_token: "${{ secrets.QUAYIO_PASSWORD }}" | |
github_token: "${{ secrets.GITHUB_TOKEN }}" | |
dockerhub_token: "${{ secrets.DOCKERHUB_ACCESS_TOKEN }}" | |
- uses: "docker/setup-qemu-action@v3" | |
- uses: "docker/setup-buildx-action@v3" | |
- 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: "2.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 }}" | |
goreleaser: | |
runs-on: "buildjet-4vcpu-ubuntu-2204" | |
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" | |
- name: "Fail for an invalid version" | |
if: "${{ !startsWith(github.ref_name, 'v') || steps.version.outputs.is_valid != 'true' }}" | |
run: 'echo "SpiceDB version must start with `v` and be a semver" && exit 1' | |
shell: "bash" | |
- name: "Install snapcraft" | |
run: | | |
sudo snap install snapcraft --channel=8.x/stable --classic | |
mkdir -p $HOME/.cache/snapcraft/download | |
mkdir -p $HOME/.cache/snapcraft/stage-packages | |
- uses: "authzed/actions/docker-login@main" | |
with: | |
quayio_token: "${{ secrets.QUAYIO_PASSWORD }}" | |
github_token: "${{ secrets.GITHUB_TOKEN }}" | |
dockerhub_token: "${{ secrets.DOCKERHUB_ACCESS_TOKEN }}" | |
- uses: "docker/setup-qemu-action@v3" | |
- uses: "docker/setup-buildx-action@v3" | |
- 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: "2.3.2" | |
args: "release --clean" | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
HOMEBREW_TAP_GITHUB_TOKEN: "${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}" | |
GORELEASER_KEY: "${{ secrets.GORELEASER_KEY }}" | |
GEMFURY_PUSH_TOKEN: "${{ secrets.GEMFURY_PUSH_TOKEN }}" | |
SNAPCRAFT_STORE_CREDENTIALS: "${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}" |