0.1.5 #4
Workflow file for this run
This file contains hidden or 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: Release Samtool | |
| on: | |
| push: | |
| tags: | |
| - "samtool-v*" | |
| permissions: | |
| contents: read | |
| jobs: | |
| publish-npm: | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_TERM_COLOR: always | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: | | |
| x86_64-unknown-linux-gnu | |
| aarch64-unknown-linux-gnu | |
| x86_64-apple-darwin | |
| aarch64-apple-darwin | |
| x86_64-pc-windows-msvc | |
| - name: Install cross | |
| run: cargo install cross | |
| - name: Install cargo-npm | |
| run: cargo install cargo-npm | |
| - name: Build Linux x64 | |
| run: | | |
| cd crates/samtool | |
| cross build \ | |
| -p samtool \ | |
| --release \ | |
| --target x86_64-unknown-linux-gnu | |
| - name: Build Linux ARM64 | |
| run: | | |
| cd crates/samtool | |
| cross build \ | |
| -p samtool \ | |
| --release \ | |
| --target aarch64-unknown-linux-gnu | |
| - name: Build macOS x64 | |
| run: | | |
| cd crates/samtool | |
| cross build \ | |
| -p samtool \ | |
| --release \ | |
| --target x86_64-apple-darwin | |
| - name: Build macOS ARM64 | |
| run: | | |
| cd crates/samtool | |
| cross build \ | |
| -p samtool \ | |
| --release \ | |
| --target aarch64-apple-darwin | |
| - name: Build Windows x64 | |
| run: | | |
| cd crates/samtool | |
| cross build \ | |
| -p samtool \ | |
| --release \ | |
| --target x86_64-pc-windows-msvc | |
| - name: Generate npm packages | |
| run: | | |
| cd crates/samtool | |
| cargo npm generate | |
| - name: Publish npm packages | |
| run: | | |
| cd crates/samtool | |
| cargo npm publish | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |