v1.0.41 #73
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: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
frontend: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20.8" | |
- run: make build-frontend | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: frontend | |
path: internal/http/frontend/dist | |
if-no-files-found: error | |
retention-days: 1 | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: frontend | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Unshallow | |
run: git fetch --prune --unshallow | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Install Cosign | |
uses: sigstore/cosign-installer@main | |
- name: Log in to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: amd64,arm64,arm | |
- run: make install-deps | |
- name: Copy built frontend | |
uses: actions/download-artifact@v3 | |
with: | |
name: frontend | |
path: internal/http/frontend/dist | |
- run: go generate ./... | |
- name: Store Cosign private key in a file | |
run: 'echo "$COSIGN_KEY" > /tmp/cosign.key' | |
shell: bash | |
env: | |
COSIGN_KEY: ${{secrets.COSIGN_KEY}} | |
- name: Release | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}} | |
- uses: creekorful/goreportcard-action@v1.0 |