2022-06-08 17:04:48 +02:00
|
|
|
name: Rust
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "master" ]
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
2023-02-10 13:24:03 +01:00
|
|
|
runs-on: ${{ matrix.platform }}
|
2022-06-08 17:04:48 +02:00
|
|
|
|
2023-02-10 13:24:03 +01:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
platform: [macos-latest, ubuntu-latest, windows-latest]
|
|
|
|
include:
|
|
|
|
- platform: macos-latest
|
|
|
|
target: macos
|
|
|
|
- platform: ubuntu-latest
|
|
|
|
target: linux64
|
|
|
|
- platform: windows-latest
|
|
|
|
target: win64
|
|
|
|
# platform: [ubuntu-latest]
|
2022-06-08 17:04:48 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-02-10 13:24:03 +01:00
|
|
|
- name: Setup cmake
|
|
|
|
uses: jwlawson/actions-setup-cmake@v1.13
|
|
|
|
- name: install Rust stable
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- if: matrix.platform == 'ubuntu-latest'
|
|
|
|
run: |
|
|
|
|
apt-get update
|
|
|
|
apt-get install -y libasound2-dev gcc alsa
|
2022-06-08 17:04:48 +02:00
|
|
|
- name: Build
|
2023-02-10 13:24:03 +01:00
|
|
|
run: |
|
|
|
|
cargo build --verbose --release
|
|
|
|
- name: Rename binary
|
|
|
|
run: |
|
|
|
|
mv target/release/spotify-dl target/release/spotify-dl.${{ matrix.target }}
|
2022-06-08 17:04:48 +02:00
|
|
|
- uses: "marvinpinto/action-automatic-releases@latest"
|
|
|
|
with:
|
|
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
|
|
automatic_release_tag: "latest"
|
|
|
|
prerelease: true
|
|
|
|
title: "Latest Build"
|
|
|
|
files: |
|
|
|
|
LICENSE
|
2023-02-10 13:24:03 +01:00
|
|
|
target/release/spotify-dl*
|