-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee95499
commit 1cb2554
Showing
2 changed files
with
72 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Build Release | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [macos-latest, ubuntu-latest, windows-latest] | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: build release | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release --all | ||
- name: upload playit-cli | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: playit-${{ matrix.platform }} | ||
path: ./target/release/playit-cli | ||
upload: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Download macos | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: playit-macos-latest | ||
- name: Download linux | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: playit-ubuntu-latest | ||
- name: Download windows | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: playit-windows-latest | ||
|
||
- name: Upload MacOS | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: ./playit-macos-latest | ||
asset_name: playit-darwin | ||
|
||
- name: Upload Linux | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: ./playit-ubuntu-latest | ||
asset_name: playit-amd64 | ||
|
||
- name: Upload Windows | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: ./playit-windows-latest | ||
asset_name: playit.exe |
This file was deleted.
Oops, something went wrong.