Update rust.yml

This commit is contained in:
Guillem Castro 2023-02-10 18:02:09 +01:00 committed by GitHub
parent 871b79cfbc
commit e1f93b092b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,8 +8,23 @@ env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
jobs: jobs:
build:
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 }} runs-on: ${{ matrix.platform }}
strategy: strategy:
@ -45,12 +60,11 @@ jobs:
name: Rename binary name: Rename binary
run: | run: |
mv target/release/spotify-dl target/release/spotify-dl.${{ matrix.target }} mv target/release/spotify-dl target/release/spotify-dl.${{ matrix.target }}
- uses: "marvinpinto/action-automatic-releases@latest" - name: Upload
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
repo_token: "${{ secrets.GITHUB_TOKEN }}" upload_url: ${{ needs.create_release.outputs.upload_url }}
automatic_release_tag: "latest" asset_path: target/release/spotify-dl.${{ matrix.target }}
prerelease: true asset_name: spotify-dl.${{ matrix.target }}
title: "Latest Build"
files: |
LICENSE
target/release/spotify-dl*