Merge pull request #2005 from josephschorr/lrv2-fix #123
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: | |
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" | |
version: "latest" | |
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 }}" |