Skip to content

Commit

Permalink
ci: create release for every commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hraban committed Jul 15, 2024
1 parent 34e8251 commit 28d8245
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ on:
push:
pull_request:

permissions:
# To create a new release
contents: write

jobs:
nix:
build:
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -33,9 +37,32 @@ jobs:
- name: "Upload stand-alone binary"
uses: actions/upload-artifact@v4
with:
name: git-hly-${{ matrix.os.name }}-${{ github.sha }}
name: git-hly-${{ matrix.os.name }}
path: result/bin/git-hly

release:
if: "github.ref == 'refs/heads/master'"
needs:
- build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- run: |
for f in *; do
(
cd $f
chmod +x *
tar cjvf $f.tar.bz2 *
mv *.bz2 ..
)
done
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: latest
prerelease: true
files: "git-hly*bz2
nocommit:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 28d8245

Please sign in to comment.