Skip to content

goreleaser

goreleaser #13

Workflow file for this run

name: goreleaser
on:
push:
# run only against tags
tags:
- "v*"
# do not run for weekly release tags
- "!v0.0.0-weekly*"
permissions:
contents: write
packages: write
# issues: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set GIT_LAST_COMMIT_DATE
run: echo "GIT_LAST_COMMIT_DATE=$(git log -1 --date=iso-strict --format=%cd)" >> $GITHUB_ENV
# Forces goreleaser to use the correct previous tag for the changelog
- name: Set GORELEASER_PREVIOUS_TAG
run: echo "GORELEASER_PREVIOUS_TAG=$(git tag -l --sort=-version:refname | grep -E '^v.*' | head -n 2 | tail -1)" >> $GITHUB_ENV
- run: git fetch --force --tags
- uses: actions/setup-go@v3
with:
go-version: "1.19.10"
cache: true
- uses: actions/setup-node@v3
with:
node-version: 18.15.0
cache: yarn
# setup docker buildx
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# login to docker hub
- uses: docker/login-action@v2
name: Login to Docker Hub
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: make frontend/build
- uses: goreleaser/goreleaser-action@v4
with:
# either 'goreleaser' (default) or 'goreleaser-pro':
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro'
# distribution:
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}