Skip to content

Use github-early-access/generate-build-provenance #13

Use github-early-access/generate-build-provenance

Use github-early-access/generate-build-provenance #13

Workflow file for this run

name: build-binary
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
permissions:
id-token: write
packages: write
contents: write
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Run Go build
run: |
go build -v -o demo-go ./...
- name: Sign artifact
uses: github-early-access/generate-build-provenance@main
with:
subject-path: '${{ github.workspace }}/demo-go'
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: demo-go-binary
path: demo-go