Fix cross device link during install (#97) #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: Create Rust release | |
on: | |
push: | |
tags: | |
- 'v*' | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- target: x86_64-unknown-linux-musl | |
asset: ozy-Linux-x86_64 | |
runs-on: ubuntu-22.04 | |
- target: x86_64-apple-darwin | |
asset: ozy-Darwin-x86_64 | |
runs-on: macos-13 | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup target add ${{ matrix.target }} | |
- if: ${{ contains(matrix.target, '-musl') }} | |
run: sudo apt-get install musl-tools | |
- name: Build | |
run: cargo build --release --verbose --target=${{ matrix.target }} | |
- name: Ensure version is correct | |
run: target/${{ matrix.target }}/release/ozy --version | grep "$(echo $GITHUB_REF_NAME | cut -c2-)" | |
- name: Rename | |
run: mv target/${{ matrix.target }}/release/ozy target/${{ matrix.target }}/release/${{ matrix.asset }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.asset }} | |
path: target/${{ matrix.target }}/release/${{ matrix.asset }} | |
upload: | |
needs: [ build ] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Download all workflow run artifacts | |
uses: actions/download-artifact@v4 | |
- name: Upload binaries to release | |
uses: softprops/action-gh-release@v2 | |
with: | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: true | |
files: "**/ozy-*" | |