Skip to content

chore(main): release 1.0.2 (#7) #6

chore(main): release 1.0.2 (#7)

chore(main): release 1.0.2 (#7) #6

Workflow file for this run

name: release
on:
push:
branches: [ main ]
permissions: write-all
jobs:
# Release-please for auto-updated PRs
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release-please
with:
release-type: simple # actual releasing is handled by goreleaser
package-name: gobootme
outputs:
release_created: ${{ steps.release-please.outputs.release_created }}
# Goreleaser for binary releases / GH release
goreleaser:
runs-on: ubuntu-latest
needs:
- release-please
if: needs.release-please.outputs.release_created
steps:
# Checkout code (full history)
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# Setup golang with caching
- name: Setup Golang
uses: actions/setup-go@v4
with:
go-version: stable
- id: go-cache-paths
run: |
echo "go-build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
echo "go-mod=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
- name: Go Build Cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
- name: Go Mod Cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
# Setup docker buildx
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
# Install cosign
- name: Install Cosign
uses: sigstore/cosign-installer@v3
# Run goreleaser
- name: Run Goreleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
env:
COSIGN_YES: "true"
KO_DOCKER_REPO: ghcr.io/${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}