specify package.include in Cargo.toml and bump to v0.2.0 #3
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: publish release | |
on: | |
workflow_dispatch: null | |
push: | |
tags: | |
- v* | |
- test-release-* | |
permissions: | |
contents: write | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: gh release create | |
run: gh release create --repo ${{ github.repository }} "${GITHUB_REF#refs/tags/}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
macos: | |
needs: create-release | |
runs-on: macos-13 | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: aarch64-apple-darwin,x86_64-apple-darwin | |
- run: cargo test | |
- run: cargo clippy | |
- run: cargo build --release --target aarch64-apple-darwin | |
- run: cargo build --release --target x86_64-apple-darwin | |
- run: lipo -create -output dotslash target/aarch64-apple-darwin/release/dotslash target/x86_64-apple-darwin/release/dotslash | |
- run: tar -czvf "dotslash-macos.${GITHUB_REF#refs/tags/}.tar.gz" dotslash | |
shell: bash | |
- name: upload release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
shell: bash | |
run: gh release upload "${GITHUB_REF#refs/tags/}" "dotslash-macos.${GITHUB_REF#refs/tags/}.tar.gz" | |
ubuntu: | |
needs: create-release | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: cargo test | |
- run: cargo clippy | |
- run: cargo build --release | |
- run: tar -czvf "dotslash-ubuntu.${GITHUB_REF#refs/tags/}.tar.gz" -C target/release dotslash | |
- name: upload release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
shell: bash | |
run: gh release upload "${GITHUB_REF#refs/tags/}" "dotslash-ubuntu.${GITHUB_REF#refs/tags/}.tar.gz" | |
windows: | |
needs: create-release | |
runs-on: windows-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: cargo test | |
- run: cargo clippy | |
- run: cargo build --release | |
- run: tar czvf dotslash-windows.%GITHUB_REF:~10%.tar.gz -C target/release dotslash.exe | |
shell: cmd | |
- name: upload release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: gh release upload %GITHUB_REF:~10% dotslash-windows.%GITHUB_REF:~10%.tar.gz | |
shell: cmd |