Skip to content

Commit 9d8c2fc

Browse files
committed
updated build.yml
1 parent 20df4e5 commit 9d8c2fc

1 file changed

Lines changed: 48 additions & 9 deletions

File tree

.github/workflows/build.yml

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,53 @@ jobs:
8282
name: rtl-test-binaries-${{ matrix.compiler }}
8383
path: bin/
8484

85-
# Publish to GitHub Release (release branch only)
86-
- name: Publish to GitHub Release (All binaries)
87-
if: github.ref == 'refs/heads/release'
88-
uses: softprops/action-gh-release@v2
85+
release:
86+
if: github.ref == 'refs/heads/release'
87+
needs: build
88+
runs-on: ubuntu-latest
89+
90+
concurrency:
91+
group: rolling-release-lock
92+
cancel-in-progress: false
93+
94+
permissions:
95+
contents: write
96+
97+
steps:
98+
- uses: actions/checkout@v4
8999
with:
90-
tag_name: latest
91-
name: Latest RTL Build
92-
files: |
93-
bin/**
100+
fetch-depth: 0
101+
102+
- name: Download all build artifacts
103+
uses: actions/download-artifact@v4
104+
with:
105+
path: artifacts
106+
107+
- name: Update rolling tag
108+
run: |
109+
git tag -f release-latest
110+
git push origin release-latest --force
111+
112+
- name: Delete existing release
94113
env:
95-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115+
run: |
116+
if gh release view release-latest > /dev/null 2>&1; then
117+
gh release delete release-latest -y
118+
fi
119+
120+
- name: Create release
121+
env:
122+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123+
run: |
124+
gh release create release-latest \
125+
--title "Rolling Release" \
126+
--notes "Latest build from release branch - Updated $(date -u)" \
127+
--verify-tag
128+
129+
- name: Upload assets
130+
env:
131+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
132+
run: |
133+
set -e
134+
gh release upload release-latest artifacts/** --clobber

0 commit comments

Comments
 (0)