Skip to content

Commit 6b1ad87

Browse files
committed
Per commit release
1 parent aff921f commit 6b1ad87

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,6 @@ jobs:
8080
with:
8181
submodules: recursive
8282

83-
- name: Move latest tag
84-
run: |
85-
git tag -f latest
86-
git push -f --tags
87-
shell: bash
88-
8983
- name: Download Windows Artifact
9084
uses: actions/download-artifact@v4
9185
with:
@@ -98,9 +92,31 @@ jobs:
9892
name: build-macos-latest
9993
path: ./macos-build-output/
10094

101-
- name: Upload new assets
95+
- name: Get commit info
96+
id: commit_info
97+
run: |
98+
SHORT_SHA=$(git rev-parse --short HEAD)
99+
COMMIT_MSG=$(git log -1 --pretty=%s)
100+
echo "short_sha=$SHORT_SHA" >> "$GITHUB_OUTPUT"
101+
echo "commit_msg=$COMMIT_MSG" >> "$GITHUB_OUTPUT"
102+
shell: bash
103+
104+
- name: Create per-commit release
102105
env:
103106
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
104107
run: |
108+
gh release create "${{ steps.commit_info.outputs.short_sha }}" \
109+
--title "${{ steps.commit_info.outputs.short_sha }} - ${{ steps.commit_info.outputs.commit_msg }}" \
110+
--notes "Build from commit ${{ github.sha }}" \
111+
--repo LogFlames/folje \
112+
./windows-build-output/Följe.exe ./macos-build-output/Följe.app.zip
113+
shell: bash
114+
115+
- name: Update latest release
116+
env:
117+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
118+
run: |
119+
git tag -f latest
120+
git push -f --tags
105121
gh release upload latest ./windows-build-output/Följe.exe ./macos-build-output/Följe.app.zip --clobber --repo LogFlames/folje
106122
shell: bash

0 commit comments

Comments
 (0)