Skip to content

Commit bc1c446

Browse files
committed
ci(release-dmr): pin actions to commit SHAs, drop 3p release action
release-dmr.yml used floating major-version tags (actions/checkout@v4, actions/setup-go@v5, actions/upload-artifact@v4, actions/download-artifact@v4) and the third-party softprops/action-gh-release@v2 action. Org policy requires every action be pinned to a full-length commit SHA, so pushing the dmr-v0.1.0 tag failed immediately with 'actions must be pinned to a full-length commit SHA' before a single build step ran. Pin the four actions to the same commit SHAs already used elsewhere in this repo (release.yml, ci.yml, e2e-test.yml, integration-test.yml) so there is a single already-vetted pin per action instead of introducing new ones. Replace softprops/action-gh-release with a 'gh release create' step, matching the pattern release.yml already uses for the model-runner container image releases, so we don't need to pin/vet a new third-party action just for this workflow.
1 parent e097902 commit bc1c446

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

.github/workflows/release-dmr.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ jobs:
3838
# being released here — the same version derivation used by
3939
# `make build-dmr` for local/dev builds, kept as a single source of
4040
# truth instead of re-encoding build flags in this workflow.
41-
- uses: actions/checkout@v4
41+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
4242
with:
4343
fetch-depth: 0
4444

45-
- uses: actions/setup-go@v5
45+
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16
4646
with:
4747
go-version-file: go.mod
4848

@@ -65,7 +65,7 @@ jobs:
6565
- id: version
6666
run: echo "version=${TAG#dmr-v}" >> "$GITHUB_OUTPUT"
6767

68-
- uses: actions/upload-artifact@v4
68+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
6969
with:
7070
name: dmr-archives
7171
path: dist/release/*
@@ -78,17 +78,21 @@ jobs:
7878
outputs:
7979
version: ${{ needs.build.outputs.version }}
8080
steps:
81-
- uses: actions/download-artifact@v4
81+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
8282
with:
8383
name: dmr-archives
8484
path: dist
8585

86-
- uses: softprops/action-gh-release@v2
87-
with:
88-
tag_name: ${{ env.TAG }}
89-
name: "dmr ${{ needs.build.outputs.version }}"
90-
files: dist/*
91-
generate_release_notes: true
86+
- name: Create GitHub Release
87+
env:
88+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89+
run: |
90+
set -euo pipefail
91+
gh release create "$TAG" \
92+
--repo "${{ github.repository }}" \
93+
--title "dmr ${{ needs.build.outputs.version }}" \
94+
--generate-notes \
95+
dist/*
9296
9397
publish-homebrew:
9498
name: Publish Homebrew formula

0 commit comments

Comments
 (0)