Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Windows binary to releases #89

Merged
merged 12 commits into from
May 26, 2022
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