name: release on: push: tags: ["v*"] permissions: contents: write packages: write jobs: binaries: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 # goreleaser needs full history for tag + changelog - uses: actions/setup-node@v4 with: node-version: 24 cache: npm - run: npm ci - run: npm run build # go:embed all:dist reads internal/web/dist at compile time. # Merge into dist/ — don't rm -rf: the tracked .keep must survive or # goreleaser aborts on the dirty tree. - run: cp -r apps/frontend/dist/. apps/backend/internal/web/dist/ - uses: actions/setup-go@v5 with: go-version-file: apps/backend/go.mod cache-dependency-path: apps/backend/go.sum - uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser version: "~> v2" args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} docker: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3 - uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - uses: docker/metadata-action@v5 id: meta with: images: ghcr.io/${{ github.repository }} tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=raw,value=latest - uses: docker/build-push-action@v6 with: context: . file: infra/Dockerfile platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max