release: v0.3.8 #55
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: Build | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- "*" | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: "-C strip=symbols" | |
jobs: | |
build: | |
name: Build for ${{ matrix.os}} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
artifact_name: mpv-handler | |
asset_name: linux-amd64 | |
target: x86_64-unknown-linux-musl | |
- os: windows-latest | |
artifact_name: mpv-handler.exe | |
artifact_name_debug: mpv-handler-debug.exe | |
asset_name: windows-amd64 | |
asset_name_debug: windows-amd64-debug | |
target: x86_64-pc-windows-msvc | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
if: matrix.target == 'x86_64-unknown-linux-musl' | |
run: | | |
sudo apt-get install -y musl | |
rustup target add x86_64-unknown-linux-musl | |
- name: Build | |
run: | | |
cargo build --release --locked --target ${{ matrix.target }} | |
- name: Upload to artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.asset_name }} | |
path: target/${{ matrix.target }}/release/${{ matrix.artifact_name }} | |
- name: Build mpv-debug for Windows | |
if: matrix.os == 'windows-latest' | |
run: | | |
cargo build --release --locked --target ${{ matrix.target }} ` | |
--features console | |
move target/${{ matrix.target }}/release/${{ matrix.artifact_name }} ` | |
target/${{ matrix.target }}/release/${{ matrix.artifact_name_debug }} | |
- name: Upload mpv-debug to artifact | |
if: matrix.os == 'windows-latest' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.asset_name_debug }} | |
path: target/${{ matrix.target }}/release/${{ matrix.artifact_name_debug }} | |
publish: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
- name: Package Linux | |
run: | | |
zip -j mpv-handler-linux-amd64.zip \ | |
README*.md \ | |
share/linux/* \ | |
linux-amd64/mpv-handler | |
- name: Package Windows | |
run: | | |
zip -j mpv-handler-windows-amd64.zip \ | |
README*.md \ | |
share/windows/* \ | |
windows-amd64/mpv-handler.exe \ | |
windows-amd64-debug/mpv-handler-debug.exe | |
- name: SHA512SUM | |
run: | | |
sha512sum mpv-handler-*.zip > sha512sum | |
- name: Publish | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "mpv-handler-*.zip,sha512sum" | |
generateReleaseNotes: true | |
token: ${{ secrets.GITHUB_TOKEN }} |