Skip to content

Merge pull request #92 from ksoclabs/bump-dependencies #284

Merge pull request #92 from ksoclabs/bump-dependencies

Merge pull request #92 from ksoclabs/bump-dependencies #284

Workflow file for this run

name: release
on:
push:
tags:
- "v*"
workflow_call:
secrets:
PERSONAL_ACCESS_TOKEN:
required: true
PUBLIC_GCR_JSON_KEY:
required: true
permissions:
contents: write # needed to write releases
id-token: write # needed for keyless signing
jobs:
version:
runs-on: ubuntu-latest
if: startsWith(github.head_ref, 'renovate') == false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Detect Version for Docker
id: docker-version
run: echo "VERSION=$(SEP="-" scripts/version)" >> $GITHUB_OUTPUT
- name: Detect Version
id: version
run: echo "VERSION=$(scripts/version)" >> $GITHUB_OUTPUT
outputs:
docker-version: ${{ steps.docker-version.outputs.VERSION }}
version: ${{ steps.version.outputs.VERSION }}
goreleaser:
timeout-minutes: 90
runs-on: ubuntu-latest
needs:
- version
env:
SUMMARY: ${{ needs.version.outputs.docker-version }}
VERSION: ${{ needs.version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
check-latest: true # https://github.com/actions/setup-go#check-latest-version
cache: true # https://github.com/actions/setup-go#caching-dependency-files-and-build-outputs
- uses: sigstore/[email protected] # installs cosign
- uses: anchore/sbom-action/[email protected] # installs syft
- name: Login to GCR
uses: docker/login-action@v3
with:
registry: us.gcr.io
username: _json_key
password: ${{ secrets.PUBLIC_GCR_JSON_KEY }}
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
install-only: true
- name: Generate SBOM
uses: CycloneDX/gh-gomod-generate-sbom@v2
with:
args: mod -licenses -json -output bom.json
version: ^v1
- name: Release
if: startsWith(github.ref , 'refs/tags/v') == true
run: make release
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}