diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dba49df..20081fe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 }} diff --git a/README.md b/README.md index 9a788b2..f2dd4fa 100644 --- a/README.md +++ b/README.md @@ -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