v1.3.1 #25
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: Release | |
on: | |
release: | |
types: [published] | |
permissions: | |
contents: write | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
publish: | |
name: Release - ${{ matrix.target }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: macos-latest | |
target: aarch64-apple-darwin | |
- os: macos-latest | |
target: x86_64-apple-darwin | |
- os: windows-latest | |
target: aarch64-pc-windows-msvc | |
- os: windows-latest | |
target: x86_64-pc-windows-msvc | |
# - os: ubuntu-latest # zune-jpeg fails to build at the moment | |
# target: aarch64-unknown-linux-gnu | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Rust Toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
target: ${{ matrix.target }} | |
- name: Build and Package | |
run: cargo xtask bundle --release --target ${{ matrix.target }} | |
- name: Move Artifacts | |
run: | | |
cd target/${{ matrix.target }}/release/bundle | |
mkdir -p dist | |
if [ "${{ matrix.os }}" == "macos-latest" ]; then | |
mv dmg/*.dmg dist/blurthing-${{ matrix.target }}.dmg | |
elif [ "${{ matrix.os }}" == "windows-latest" ]; then | |
mv msi/*.msi dist/blurthing-${{ matrix.target }}.msi | |
elif [ "${{ matrix.os }}" == "ubuntu-latest" ]; then | |
mv deb/*.deb dist/blurthing-${{ matrix.target }}.deb | |
mv rpm/*.rpm dist/blurthing-${{ matrix.target }}.rpm | |
fi | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.target }} | |
path: target/${{ matrix.target }}/release/bundle/dist | |
- name: Upload Release | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: target/${{ matrix.target }}/release/bundle/dist/* |