Skip to content

Commit

Permalink
add a workflow to build the binary and use the GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
jhrozek authored Jan 17, 2024
1 parent bf9945a commit 232e2c1
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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

0 comments on commit 232e2c1

Please sign in to comment.