mirror of
https://github.com/slsa-framework/slsa-verifier.git
synced 2026-08-18 02:56:31 +00:00
update version information for release (#296)
Signed-off-by: Asra Ali <asraa@google.com> Signed-off-by: Asra Ali <asraa@google.com>
This commit is contained in:
@@ -14,4 +14,4 @@ binary: slsa-verifier-{{ .Os }}-{{ .Arch }}
|
||||
dir: ./cli/slsa-verifier
|
||||
|
||||
ldflags:
|
||||
- "-X version.Version={{ .Version }}"
|
||||
- "-X version.Version={{ .Env.Version }}"
|
||||
|
||||
@@ -17,6 +17,20 @@ env:
|
||||
ISSUE_REPOSITORY: slsa-framework/slsa-verifier
|
||||
|
||||
jobs:
|
||||
# Generate ldflags dynamically.
|
||||
args:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.ldflags.outputs.version }}
|
||||
steps:
|
||||
- id: checkout
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # tag=v2.3.4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- id: ldflags
|
||||
run: |
|
||||
echo "::set-output name=version::$(git describe --tags --always --dirty | cut -c2-)"
|
||||
|
||||
builder:
|
||||
permissions:
|
||||
actions: read # For the detection of GitHub Actions environment.
|
||||
@@ -27,6 +41,7 @@ jobs:
|
||||
go-version: 1.18
|
||||
config-file: .github/config-release.yml
|
||||
compile-builder: true
|
||||
evaluated-envs: "VERSION:${{needs.args.outputs.version}}"
|
||||
|
||||
# In case this fails, e.g. build configuration changes, file an issue in slsa-verifier
|
||||
if-failed:
|
||||
|
||||
Reference in New Issue
Block a user