-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add initial release automation #13
Conversation
.github/workflows/release.yaml
Outdated
- name: Set tag name | ||
shell: bash | ||
run: | | ||
echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v3 | ||
with: | ||
go-version: '1.22' | ||
check-latest: true | ||
|
||
- name: Check out code | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
with: | ||
fetch-depth: 1 | ||
- name: Install bom | ||
uses: kubernetes-sigs/release-actions/setup-bom@2f8b9ec22aedc9ce15039b6c7716aa6c2907df1c # v0.2.0 | ||
- name: Generate SBOM | ||
shell: bash | ||
run: | | ||
bom generate --format=json -o /tmp/protobom-storage-$TAG.spdx.json . | ||
- name: Publish Release | ||
uses: kubernetes-sigs/release-actions/publish-release@2f8b9ec22aedc9ce15039b6c7716aa6c2907df1c # v0.2.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
assets: "/tmp/protobom-storage-$TAG.spdx.json" | ||
sbom: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor formatting things, take it or leave it. Also gets the go version from go.mod instead of static 1.22
- name: Set tag name | |
shell: bash | |
run: | | |
echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v3 | |
with: | |
go-version: '1.22' | |
check-latest: true | |
- name: Check out code | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
with: | |
fetch-depth: 1 | |
- name: Install bom | |
uses: kubernetes-sigs/release-actions/setup-bom@2f8b9ec22aedc9ce15039b6c7716aa6c2907df1c # v0.2.0 | |
- name: Generate SBOM | |
shell: bash | |
run: | | |
bom generate --format=json -o /tmp/protobom-storage-$TAG.spdx.json . | |
- name: Publish Release | |
uses: kubernetes-sigs/release-actions/publish-release@2f8b9ec22aedc9ce15039b6c7716aa6c2907df1c # v0.2.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
assets: "/tmp/protobom-storage-$TAG.spdx.json" | |
sbom: false | |
- name: Set tag name | |
shell: bash | |
run: echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v3 | |
with: | |
go-version-file: go.mod | |
cache: false | |
- name: Check out code | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
with: | |
fetch-depth: 1 | |
- name: Install bom | |
uses: kubernetes-sigs/release-actions/setup-bom@2f8b9ec22aedc9ce15039b6c7716aa6c2907df1c # v0.2.0 | |
- name: Generate SBOM | |
shell: bash | |
run: bom generate --format=json -o /tmp/protobom-storage-$TAG.spdx.json . | |
- name: Publish Release | |
uses: kubernetes-sigs/release-actions/publish-release@2f8b9ec22aedc9ce15039b6c7716aa6c2907df1c # v0.2.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
assets: /tmp/protobom-storage-$TAG.spdx.json | |
sbom: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, pushed a revision with the suggested changes, PTAL @jhoward-lm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The header got kind of cut off but otherwise LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean the github disclaimer? Why would you want that text?
This commmit adds the first basic release workflow to cut a release and build an SBOM. Signed-off-by: Adolfo García Veytia (Puerco) <puerco@stacklok.com>
This commmit adds the first basic release workflow to cut a release and build an SBOM.
Signed-off-by: Adolfo García Veytia (Puerco) puerco@stacklok.com