Skip to content

Commit 832966e

Browse files
authored
Merge pull request #11 from stacklok/fix/release-workflow-resilience
Fix release workflow resilience and rate limiting
2 parents fda3524 + 06f6fc5 commit 832966e

2 files changed

Lines changed: 15 additions & 9 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
uses: arduino/setup-task@v2
3737
with:
3838
version: 3.x
39+
repo-token: ${{ secrets.GITHUB_TOKEN }}
3940

4041
- name: Run tests (excluding CGO packages)
4142
run: task test-nocgo
@@ -82,6 +83,7 @@ jobs:
8283
uses: arduino/setup-task@v2
8384
with:
8485
version: 3.x
86+
repo-token: ${{ secrets.GITHUB_TOKEN }}
8587

8688
- name: Verify compilation (pure Go packages)
8789
run: task build-nocgo
@@ -97,6 +99,7 @@ jobs:
9799
uses: arduino/setup-task@v2
98100
with:
99101
version: 3.x
102+
repo-token: ${{ secrets.GITHUB_TOKEN }}
100103

101104
- name: Login to ghcr.io
102105
uses: docker/login-action@v3
@@ -125,6 +128,7 @@ jobs:
125128
uses: arduino/setup-task@v2
126129
with:
127130
version: 3.x
131+
repo-token: ${{ secrets.GITHUB_TOKEN }}
128132

129133
- name: Install libkrun
130134
run: |

.github/workflows/release.yaml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
uses: arduino/setup-task@v2
3232
with:
3333
version: 3.x
34+
repo-token: ${{ secrets.GITHUB_TOKEN }}
3435

3536
- name: Login to ghcr.io
3637
uses: docker/login-action@v3
@@ -81,6 +82,7 @@ jobs:
8182
uses: arduino/setup-task@v2
8283
with:
8384
version: 3.x
85+
repo-token: ${{ secrets.GITHUB_TOKEN }}
8486

8587
- name: Install libkrun via Homebrew
8688
run: |
@@ -112,6 +114,7 @@ jobs:
112114
name: Create Release
113115
runs-on: ubuntu-latest
114116
needs: [build-artifacts, build-artifacts-darwin]
117+
if: ${{ always() && needs.build-artifacts.result == 'success' }}
115118
steps:
116119
- name: Checkout repository
117120
uses: actions/checkout@v6
@@ -125,18 +128,17 @@ jobs:
125128
run: |
126129
sha256sum propolis-*.tar.gz > sha256sums.txt
127130
128-
- name: Create GitHub Release
131+
- name: Create or update GitHub Release
129132
env:
130133
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131134
run: |
132-
gh release create ${{ github.ref_name }} --generate-notes \
133-
propolis-runtime-linux-amd64.tar.gz \
134-
propolis-runtime-linux-arm64.tar.gz \
135-
propolis-firmware-linux-amd64.tar.gz \
136-
propolis-firmware-linux-arm64.tar.gz \
137-
propolis-runtime-darwin-arm64.tar.gz \
138-
propolis-firmware-darwin-arm64.tar.gz \
139-
sha256sums.txt
135+
if gh release view "${{ github.ref_name }}" >/dev/null 2>&1; then
136+
gh release upload "${{ github.ref_name }}" --clobber \
137+
propolis-*.tar.gz sha256sums.txt
138+
else
139+
gh release create "${{ github.ref_name }}" --generate-notes \
140+
propolis-*.tar.gz sha256sums.txt
141+
fi
140142
141143
push-oci:
142144
name: Push OCI (${{ matrix.arch }})

0 commit comments

Comments
 (0)