mirror of
https://github.com/GuillemCastro/spotify-dl.git
synced 2024-11-13 22:50:26 +01:00
Merge branch 'original' into origin/master
This commit is contained in:
commit
01048ae999
2 changed files with 71 additions and 51 deletions
71
.github/workflows/release.yml
vendored
Normal file
71
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
|
||||||
|
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: ${{ github.ref }}
|
||||||
|
release_name: Release ${{ github.ref }}
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
|
||||||
|
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 }}
|
51
.github/workflows/rust.yml
vendored
51
.github/workflows/rust.yml
vendored
|
@ -1,51 +0,0 @@
|
||||||
name: Rust
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "master" ]
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
|
|
||||||
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
|
|
||||||
- name: Rename binary
|
|
||||||
run: |
|
|
||||||
mv target/release/spotify-dl* target/release/spotify-dl.${{ matrix.target }}
|
|
||||||
- uses: "marvinpinto/action-automatic-releases@latest"
|
|
||||||
with:
|
|
||||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
automatic_release_tag: "latest"
|
|
||||||
prerelease: true
|
|
||||||
title: "Latest Build"
|
|
||||||
files: |
|
|
||||||
LICENSE
|
|
||||||
target/release/spotify-dl*
|
|
Loading…
Reference in a new issue