mirror of
https://github.com/GuillemCastro/spotify-dl.git
synced 2024-11-25 03:20:27 +01:00
Merge workflows
This commit is contained in:
parent
18194228a5
commit
db6f2ce59e
9 changed files with 206 additions and 204 deletions
50
.github/workflows/build-latest.yml
vendored
Normal file
50
.github/workflows/build-latest.yml
vendored
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
name: Build latest
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
linux:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: install Rust stable
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cargo build --verbose --release
|
||||||
|
|
||||||
|
macos:
|
||||||
|
runs-on: macos-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: install Rust stable
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cargo build --verbose --release
|
||||||
|
|
||||||
|
windows:
|
||||||
|
runs-on: windows-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: install Rust stable
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cargo build --verbose --release
|
27
.github/workflows/build-linux.yml
vendored
27
.github/workflows/build-linux.yml
vendored
|
@ -1,27 +0,0 @@
|
||||||
name: Build latest - Linux
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- '*'
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: install Rust stable
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
- name: Build
|
|
||||||
run: |
|
|
||||||
cargo build --verbose --release
|
|
||||||
|
|
26
.github/workflows/build-macos.yml
vendored
26
.github/workflows/build-macos.yml
vendored
|
@ -1,26 +0,0 @@
|
||||||
name: Build latest - MacOS
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- '*'
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
build:
|
|
||||||
runs-on: macos-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: install Rust stable
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
- name: Build
|
|
||||||
run: |
|
|
||||||
cargo build --verbose --release
|
|
27
.github/workflows/build-windows.yml
vendored
27
.github/workflows/build-windows.yml
vendored
|
@ -1,27 +0,0 @@
|
||||||
name: Build latest - Windows
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- '*'
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
build:
|
|
||||||
runs-on: windows-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: install Rust stable
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
- name: Build
|
|
||||||
run: |
|
|
||||||
cargo build --verbose --release
|
|
||||||
|
|
42
.github/workflows/create-release.yml
vendored
Normal file
42
.github/workflows/create-release.yml
vendored
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
name: Create Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
release_type:
|
||||||
|
description: 'Type of release to create'
|
||||||
|
required: true
|
||||||
|
default: 'minor'
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- patch
|
||||||
|
- minor
|
||||||
|
- major
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
bump-version:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Bump version
|
||||||
|
uses: tj-actions/cargo-bump@v3
|
||||||
|
with:
|
||||||
|
release_type: ${{ github.event.inputs.release_type }}
|
||||||
|
- name: Commit changes
|
||||||
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
|
with:
|
||||||
|
commit_message: "Bump version to v${{ steps.bump-version.outputs.new_version }}"
|
||||||
|
commit_user_name: "github-actions[bot]"
|
||||||
|
commit_user_email: "github-actions[bot]@users.noreply.github.com"
|
||||||
|
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
|
||||||
|
branch: master
|
||||||
|
create-tag:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: bump-version
|
||||||
|
steps:
|
||||||
|
- name: Create tag
|
||||||
|
uses: rickstaa/action-create-tag@v1
|
||||||
|
with:
|
||||||
|
tag: v${{ steps.bump-version.outputs.new_version }}
|
||||||
|
message: "Bump version to v${{ steps.bump-version.outputs.new_version }}"
|
40
.github/workflows/linux.yml
vendored
40
.github/workflows/linux.yml
vendored
|
@ -1,40 +0,0 @@
|
||||||
name: Release - Linux
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- '*'
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- 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.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 }}
|
|
||||||
|
|
45
.github/workflows/macos.yml
vendored
45
.github/workflows/macos.yml
vendored
|
@ -1,45 +0,0 @@
|
||||||
name: Release - MacOS
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- '*'
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
build:
|
|
||||||
runs-on: macos-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: install Rust stable
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
- name: Build
|
|
||||||
run: |
|
|
||||||
cargo build --verbose --release
|
|
||||||
- name: Compress binary
|
|
||||||
run: |
|
|
||||||
tar -czvf target/release/spotify-dl.macos.tar.gz target/release/spotify-dl
|
|
||||||
- name: SHA 256
|
|
||||||
run: |
|
|
||||||
shasum -a 256 target/release/spotify-dl.macos.tar.gz
|
|
||||||
- name: Rename binary
|
|
||||||
run: |
|
|
||||||
mv target/release/spotify-dl target/release/spotify-dl.macos
|
|
||||||
- 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, target/release/spotify-dl.macos.tar.gz
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
114
.github/workflows/release.yml
vendored
Normal file
114
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,114 @@
|
||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
linux:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- 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.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 }}
|
||||||
|
|
||||||
|
macos:
|
||||||
|
runs-on: macos-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- 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-aarch64
|
||||||
|
- 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-aarch64
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
windows:
|
||||||
|
runs-on: windows-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- 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 }}
|
||||||
|
|
||||||
|
cargo:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: install Rust stable
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cargo build --verbose --release
|
||||||
|
- name: Run cargo publish
|
||||||
|
run: |
|
||||||
|
cargo publish --token ${{ secrets.CARGO_TOKEN }}
|
||||||
|
|
||||||
|
homebrew:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Update Hombrew formula
|
||||||
|
uses: dawidd6/action-homebrew-bump-formula@v3
|
||||||
|
with:
|
||||||
|
tap: guillemcastro/spotify-dl
|
||||||
|
formula: spotify-dl
|
||||||
|
token: ${{ secrets.HOMEBREW_TOKEN }}
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
no_fork: true
|
39
.github/workflows/windows.yml
vendored
39
.github/workflows/windows.yml
vendored
|
@ -1,39 +0,0 @@
|
||||||
name: Release - Windows
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- '*'
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
build:
|
|
||||||
runs-on: windows-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- 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