Skip to content

Commit

Permalink
updating the workflow to add version.
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Sirchia <[email protected]>
  • Loading branch information
robertsirc committed Jul 25, 2024
1 parent 7007730 commit 7b3a5c3
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/go-slsa3-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ on:
permissions: read-all

jobs:
# ========================================================================================================================================
# Prerequesite: Create a .slsa-goreleaser.yml in the root directory of your project.
# See format in https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/go/README.md#configuration-file
#=========================================================================================================================================
args:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.ldflags.outputs.version }}
steps:
- id: ldflags
run: |
echo "version=$(git describe --tags --always --dirty | cut -c2-)" >> "$GITHUB_OUTPUT"
build:
permissions:
id-token: write # To sign.
Expand All @@ -19,6 +23,4 @@ jobs:
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
with:
go-version: 1.22
# =============================================================================================================
# Optional: For more options, see https://github.com/slsa-framework/slsa-github-generator#golang-projects
# =============================================================================================================
evaluated-envs: "VERSION:${{needs.args.outputs.version}}"

0 comments on commit 7b3a5c3

Please sign in to comment.