Skip to content

Commit 359e185

Browse files
committed
ci: create release for every commit
1 parent 34e8251 commit 359e185

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ on:
44
push:
55
pull_request:
66

7+
permissions:
8+
# To create a new release
9+
contents: write
10+
711
jobs:
8-
nix:
12+
build:
913
strategy:
1014
fail-fast: false
1115
matrix:
@@ -33,9 +37,32 @@ jobs:
3337
- name: "Upload stand-alone binary"
3438
uses: actions/upload-artifact@v4
3539
with:
36-
name: git-hly-${{ matrix.os.name }}-${{ github.sha }}
40+
name: git-hly-${{ matrix.os.name }}
3741
path: result/bin/git-hly
3842

43+
release:
44+
if: "github.ref == 'refs/heads/master'"
45+
needs:
46+
- build
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/download-artifact@v4
50+
- run: |
51+
for f in *; do
52+
(
53+
cd $f
54+
chmod +x *
55+
tar cjvf $f.tar.bz2 *
56+
mv *.bz2 ..
57+
)
58+
done
59+
- uses: marvinpinto/action-automatic-releases@latest
60+
with:
61+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
62+
automatic_release_tag: latest
63+
prerelease: true
64+
files: "git-hly*bz2"
65+
3966
nocommit:
4067
runs-on: ubuntu-latest
4168
steps:

0 commit comments

Comments
 (0)