Skip to content

Commit

Permalink
build: Use tagged releases
Browse files Browse the repository at this point in the history
  • Loading branch information
pojntfx committed Jul 28, 2021
1 parent 125469e commit dc75a49
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/hydrun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,20 @@ jobs:
go-version: 1.16
- name: Build with hydrun
run: go run main.go -o golang ./Hydrunfile
- name: Publish release to GitHub releases
- name: Publish pre-release to GitHub releases
if: ${{ github.ref == 'refs/heads/main' }}
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
automatic_release_tag: unstable
prerelease: true
files: |
out/*
- name: Publish release to GitHub releases
if: startsWith(github.ref, 'refs/tags/v')
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
out/*
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ Static binaries are also available on [GitHub releases](https://github.com/pojnt
On Linux, you can install them like so:

```shell
$ curl -L -o /tmp/hydrun "https://github.com/pojntfx/hydrun/releases/download/latest/hydrun.linux-$(uname -m)"
$ curl -L -o /tmp/hydrun "https://github.com/pojntfx/hydrun/releases/latest/download/hydrun.linux-$(uname -m)"
$ sudo install /tmp/hydrun /usr/local/bin
```

On macOS, you can use the following:

```shell
$ curl -L -o /tmp/hydrun "https://github.com/pojntfx/hydrun/releases/download/latest/hydrun.darwin-$(uname -m)"
$ curl -L -o /tmp/hydrun "https://github.com/pojntfx/hydrun/releases/latest/download/hydrun.darwin-$(uname -m)"
$ sudo install /tmp/hydrun /usr/local/bin
```

On Windows, the following should work (using PowerShell as administrator):

```shell
PS> Invoke-WebRequest https://github.com/pojntfx/hydrun/releases/download/latest/hydrun.windows-x86_64.exe -OutFile \Windows\System32\hydrun.exe
PS> Invoke-WebRequest https://github.com/pojntfx/hydrun/releases/latest/download/hydrun.windows-x86_64.exe -OutFile \Windows\System32\hydrun.exe
```

You can find binaries for more operating systems and architectures on [GitHub releases](https://github.com/pojntfx/hydrun/releases).
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
uses: docker/setup-buildx-action@v1
- name: Set up hydrun
run: |
curl -L -o /tmp/hydrun https://github.com/pojntfx/hydrun/releases/download/latest/hydrun.linux-$(uname -m)
curl -L -o /tmp/hydrun https://github.com/pojntfx/hydrun/releases/latest/download/hydrun.linux-$(uname -m)
sudo install /tmp/hydrun /usr/local/bin
- name: Build with hydrun
run: hydrun -a amd64,arm64 ./Hydrunfile
Expand Down

0 comments on commit dc75a49

Please sign in to comment.