diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0cfd22d..37e524c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,8 +4,12 @@ on: push: pull_request: +permissions: + # To create a new release + contents: write + jobs: - nix: + build: strategy: fail-fast: false matrix: @@ -36,6 +40,25 @@ jobs: name: git-hly-${{ matrix.os.name }}-${{ github.sha }} 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: | + mv git-hly-macos* git-hly-macos + zip -r git-hly-macos.zip git-hly-macos + mv git-hly-linux* git-hly-linux + zip -r git-hly-linux.zip git-hly-linux + - uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: latest + prerelease: true + files: "git-hly*.zip" + nocommit: runs-on: ubuntu-latest steps: