v2.3.3 #24
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: releaser | |
on: | |
release: | |
types: | |
- created | |
jobs: | |
release-to-cargo: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Chekout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Publish to crates.io | |
shell: bash | |
env: | |
CRATES_API_KEY: ${{ secrets.CRATES_API_KEY }} | |
run: | | |
cargo login "$CRATES_API_KEY" | |
cargo publish --dry-run | |
cargo publish | |
release_for_mac_x86: | |
name: MacOS-x86 | |
runs-on: macos-10.15 | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: Rename binary | |
run: mv target/release/wdcrypt wdcrypt-macos-x86 | |
- name: Upload to release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
curl \ | |
-f \ | |
-sSL \ | |
-XPOST \ | |
-H "Authorization: token $GITHUB_TOKEN" \ | |
-H "Content-Length: $(stat -f%z wdcrypt-macos-x86)" \ | |
-H "Content-Type: application/octet-stream" \ | |
--upload-file "wdcrypt-macos-x86" \ | |
"https://uploads.github.com/repos/$GITHUB_REPOSITORY/releases/$(jq --raw-output '.release.id' $GITHUB_EVENT_PATH)/assets?name=wdcrypt-macos-x86" | |
release_for_mac_arm64: | |
name: MacOS-arm64 | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install ARM target | |
run: rustup update && rustup target add aarch64-apple-darwin | |
- name: Build ARM | |
run: cargo build --release --target=aarch64-apple-darwin | |
- name: Rename binary | |
run: mv target/aarch64-apple-darwin/release/wdcrypt wdcrypt-macos-arm64 | |
- name: Upload to release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
curl \ | |
-f \ | |
-sSL \ | |
-XPOST \ | |
-H "Authorization: token $GITHUB_TOKEN" \ | |
-H "Content-Length: $(stat -f%z wdcrypt-macos-arm64)" \ | |
-H "Content-Type: application/octet-stream" \ | |
--upload-file "wdcrypt-macos-arm64" \ | |
"https://uploads.github.com/repos/$GITHUB_REPOSITORY/releases/$(jq --raw-output '.release.id' $GITHUB_EVENT_PATH)/assets?name=wdcrypt-macos-arm64" | |
release_for_linux: | |
name: Linux | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: Rename binary | |
run: mv target/release/wdcrypt wdcrypt-linux-amd64 | |
- name: Upload to release | |
uses: JasonEtco/upload-to-release@d648f1babf776de9cad881320bd9e9818fc3b262 | |
with: | |
args: wdcrypt-linux-amd64 application/octet-stream | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
release_for_wasm: | |
name: Wasm | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions-rs/cargo@v1 | |
- name: Change to nightly | |
run: rustup default nightly | |
- name: Add WASM as target | |
run: rustup target add wasm32-wasi | |
- name: Build for WASM | |
run: cargo build --release --target wasm32-wasi | |
- name: Rename WASM file | |
run: mv target/wasm32-wasi/release/wdcrypt.wasm wdcrypt.wasm | |
- name: Upload to release | |
uses: JasonEtco/upload-to-release@d648f1babf776de9cad881320bd9e9818fc3b262 | |
with: | |
args: wdcrypt.wasm application/octet-stream | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |