Skip to content

Commit

Permalink
Merge pull request #89 from jacobdeichert/release-windows-binary
Browse files Browse the repository at this point in the history
Add Windows binary to releases
  • Loading branch information
jacobdeichert authored May 26, 2022
2 parents 2f18731 + c99e935 commit a57d408
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
run: ./.github/actions/attach-release-assets/run.sh ./*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release-homebrew:
needs: release-macos-x86-64
runs-on: ubuntu-latest
Expand All @@ -102,5 +102,30 @@ jobs:
env:
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
with:
# Sends a PR to homebrew-core to update the formula
# Sends a PR to homebrew-core to update the formula
formula-name: mask

release-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Fetch dependencies
run: cargo fetch
- name: Build in release mode
run: cargo build --release --frozen --target x86_64-pc-windows-msvc
- name: Add the version tag to the binary name
shell: bash
run: |
VERSION_TAG=$(jq --raw-output '.release.tag_name' "$GITHUB_EVENT_PATH")
TARGET=x86_64-pc-windows-msvc
NAME=mask-$VERSION_TAG-$TARGET
mkdir $NAME
mv ./target/$TARGET/release/mask.exe ./$NAME/mask.exe
7z a $NAME.zip $NAME
# NOTE: cannot use the attach-release-assets action because windows doesn't support docker-based actions.
# Luckily we can just run the bash script directly.
- name: Attach the binary to the release
shell: bash
run: ./.github/actions/attach-release-assets/run.sh ./*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ To get started, follow the guide below or check out the more [advanced features]

## Installation

### Precompiled binaries for linux and macOS
### Precompiled binaries

Head to the [Releases page][releases] and look for the latest published version. Under **Assets** you'll see zips available for download for linux and macOS. Once downloaded, you can unzip them and then move the `mask` binary to somewhere accessible in your `$PATH` like `mv mask /usr/local/bin`.
Head to the [Releases page][releases] and look for the latest published version. Under **Assets** you'll see zips available for download for linux, macOS and Windows. Once downloaded, you can unzip them and then move the `mask` binary to somewhere accessible in your `$PATH` like `mv mask /usr/local/bin`.

### Homebrew

Expand Down

0 comments on commit a57d408

Please sign in to comment.