mirror of
https://github.com/GuillemCastro/spotify-dl.git
synced 2024-11-22 02:10:26 +01:00
separate pipelines by platform
This commit is contained in:
parent
de6698e2b6
commit
81b3f441c1
4 changed files with 137 additions and 75 deletions
75
.github/workflows/build-latest.yml
vendored
75
.github/workflows/build-latest.yml
vendored
|
@ -1,75 +0,0 @@
|
||||||
name: Build latest
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
create_release:
|
|
||||||
name: Create release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
steps:
|
|
||||||
- name: Create release
|
|
||||||
id: create_release
|
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
tag_name: latest
|
|
||||||
release_name: Latest Build
|
|
||||||
|
|
||||||
build:
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
needs: create_release
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform: [macos-latest, ubuntu-latest, windows-latest]
|
|
||||||
include:
|
|
||||||
- platform: macos-latest
|
|
||||||
target: macos-x86_64
|
|
||||||
- platform: ubuntu-latest
|
|
||||||
target: linux-x86_64
|
|
||||||
- platform: windows-latest
|
|
||||||
target: windows-x86_64
|
|
||||||
# platform: [ubuntu-latest]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- 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: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y libasound2-dev gcc alsa
|
|
||||||
- name: Build
|
|
||||||
run: |
|
|
||||||
cargo build --verbose --release
|
|
||||||
- if: matrix.platform == 'windows-latest'
|
|
||||||
name: Rename binary
|
|
||||||
run: |
|
|
||||||
mv target/release/spotify-dl.exe target/release/spotify-dl.${{ matrix.target }}
|
|
||||||
- if: matrix.platform != 'windows-latest'
|
|
||||||
name: Rename binary
|
|
||||||
run: |
|
|
||||||
mv target/release/spotify-dl target/release/spotify-dl.${{ matrix.target }}
|
|
||||||
- name: Upload
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
|
||||||
asset_path: target/release/spotify-dl.${{ matrix.target }}
|
|
||||||
asset_name: spotify-dl.${{ matrix.target }}
|
|
||||||
asset_content_type: application/octet-stream
|
|
49
.github/workflows/linux.yml
vendored
Normal file
49
.github/workflows/linux.yml
vendored
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
name: Build latest - Linux
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Setup cmake
|
||||||
|
uses: jwlawson/actions-setup-cmake@v1.13
|
||||||
|
- name: install Rust stable
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Setup alsa
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libasound2-dev gcc alsa
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cargo build --verbose --release
|
||||||
|
- name: Rename binary
|
||||||
|
run: |
|
||||||
|
mv target/release/spotify-dl target/release/spotify-dl.linux-x86_64
|
||||||
|
- name: Upload Linux Artifact
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
allowUpdates: True
|
||||||
|
makeLatest: True
|
||||||
|
omitBody: True
|
||||||
|
omitBodyDuringUpdate: True
|
||||||
|
omitNameDuringUpdate: True
|
||||||
|
artifacts: target/release/spotify-dl.linux-x86_64
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
44
.github/workflows/macos.yml
vendored
Normal file
44
.github/workflows/macos.yml
vendored
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
name: Build latest - MacOS
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: macos-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Setup cmake
|
||||||
|
uses: jwlawson/actions-setup-cmake@v1.13
|
||||||
|
- name: install Rust stable
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cargo build --verbose --release
|
||||||
|
- name: Rename binary
|
||||||
|
run: |
|
||||||
|
mv target/release/spotify-dl target/release/spotify-dl.macos-x86_64
|
||||||
|
- name: Upload MacOS Artifact
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
allowUpdates: True
|
||||||
|
makeLatest: True
|
||||||
|
omitBody: True
|
||||||
|
omitBodyDuringUpdate: True
|
||||||
|
omitNameDuringUpdate: True
|
||||||
|
artifacts: target/release/spotify-dl.macos-x86_64
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
44
.github/workflows/windows.yml
vendored
Normal file
44
.github/workflows/windows.yml
vendored
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
name: Build latest - Windows
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Setup cmake
|
||||||
|
uses: jwlawson/actions-setup-cmake@v1.13
|
||||||
|
- name: install Rust stable
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cargo build --verbose --release
|
||||||
|
- name: Rename binary
|
||||||
|
run: |
|
||||||
|
mv target/release/spotify-dl.exe target/release/spotify-dl.windows-x86_64
|
||||||
|
- name: Upload Windows Artifact
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
allowUpdates: True
|
||||||
|
makeLatest: True
|
||||||
|
omitBody: True
|
||||||
|
omitBodyDuringUpdate: True
|
||||||
|
omitNameDuringUpdate: True
|
||||||
|
artifacts: target/release/spotify-dl.windows-x86_64
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
Loading…
Reference in a new issue