Skip to content

docs: add github-fork-ribbon #100

docs: add github-fork-ribbon

docs: add github-fork-ribbon #100

on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
# this assumes that you have created a personal access token
# (PAT) and configured it as a GitHub action secret named
# `RELEASE_PLEASE_TOKEN` (this secret name is not important).
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
- run: echo "A release was created."
if: ${{ steps.release.outputs.release_created }}
goreleaser:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@v4
with:
go-version: stable
- name: Install Cosign
uses: sigstore/[email protected]
with:
cosign-release: 'v2.2.1'
- name: Check install!
run: cosign version
# More assembly might be required: Docker logins, GPG, etc.
# It all depends on your needs.
- uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro':
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
COSIGN_PUBLIC_KEY: ${{ secrets.COSIGN_PUBLIC_KEY }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro'
# distribution:
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}