supabase-operator/.github/workflows/release.yml
Peter Kurfer 454f665603
Some checks failed
E2E Tests / Run on Ubuntu (push) Has been cancelled
Lint / Run on Ubuntu (push) Failing after 4m27s
Tests / Run on Ubuntu (push) Failing after 4m27s
Docs / deploy (push) Successful in 43s
release / release (push) Failing after 5m25s
fix(ci): login to container registry
2025-01-22 11:05:30 +01:00

58 lines
1.3 KiB
YAML

name: release
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
fetch-tags: "true"
- name: Login to container registry
uses: docker/login-action@v3
with:
registry: code.icb4dc0.de
username: prskr
password: ${{ secrets.RELEASE_TOKEN }}
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache-dependency-path: go.sum
check-latest: true
- name: Init go
run: |
go mod download
go mod download -modfile tools/go.mod
- name: Snapshot release
uses: goreleaser/goreleaser-action@v6
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
with:
distribution: goreleaser
version: latest
args: release --clean --snapshot
- name: Release
uses: goreleaser/goreleaser-action@v6
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GORELEASER_FORCE_TOKEN: gitea
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}