Skip to content

Commit 25f2876

Browse files
committed
Create releases from github workflow
1 parent dae521a commit 25f2876

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/build.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,28 @@ jobs:
4545
- name: Build Artifacts
4646
run: make release
4747

48+
- name: Package Binary
49+
if: startsWith(github.ref, 'refs/tags/')
50+
run: |
51+
VERSION="${{ github.ref_name }}"
52+
VERSION="${VERSION#v}" # Remove 'v' prefix if present
53+
BINARY_NAME="literate-${{ matrix.platform_name }}"
54+
cd bin
55+
tar czf "${BINARY_NAME}.tar.gz" lit
56+
echo "ARTIFACT_PATH=bin/${BINARY_NAME}.tar.gz" >> $GITHUB_ENV
57+
4858
- name: Upload Artifact
49-
uses: actions/upload-artifact@v3
59+
uses: actions/upload-artifact@v4
5060
with:
5161
name: literate-${{ matrix.platform_name }}
5262
path: bin/lit
63+
64+
- name: Create Release
65+
if: startsWith(github.ref, 'refs/tags/')
66+
uses: softprops/action-gh-release@v1
67+
with:
68+
files: ${{ env.ARTIFACT_PATH }}
69+
draft: false
70+
prerelease: false
71+
env:
72+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)