improve download manaager #57
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
name: Publish builds | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "**/README.md" | |
concurrency: | |
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
publish: | |
name: Publish Builds | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
include: | |
- os: ubuntu-latest | |
release_suffix: ubuntu | |
- os: macos-latest | |
release_suffix: mac | |
- os: windows-latest | |
release_suffix: windows | |
runs-on: ${{ matrix.os }} | |
env: | |
CARGO_TERM_COLOR: always | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Install dependencies | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install build-essential librust-atk-sys-dev libgtk-3-dev \ | |
gcc-multilib libpq-dev libxcb-shape0-dev libxcb-xfixes0-dev \ | |
libasound2-dev portaudio19-dev libpulse-dev libdbus-1-dev libudev-dev protobuf-compiler | |
- uses: Swatinem/rust-cache@v2 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: Publish Console for Mac & Linux | |
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | |
uses: WebFreak001/[email protected] | |
with: | |
upload_url: https://uploads.github.com/repos/gamercade-io/gamercade_console/releases/73475292/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part | |
release_id: 73475292 # same as above (id can just be taken out the upload_url, it's used to find old releases) | |
asset_path: ./target/release/console | |
asset_name: gamercade_console-${{ matrix.release_suffix }} | |
asset_content_type: application/zip # required by GitHub API | |
- name: Publish Console for Windows | |
if: matrix.os == 'windows-latest' | |
uses: WebFreak001/[email protected] | |
with: | |
upload_url: https://uploads.github.com/repos/gamercade-io/gamercade_console/releases/73475292/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part | |
release_id: 73475292 # same as above (id can just be taken out the upload_url, it's used to find old releases) | |
asset_path: ./target/release/console.exe | |
asset_name: gamercade_console-${{ matrix.release_suffix }}.exe | |
asset_content_type: application/zip # required by GitHub API | |
- name: Publish Editor for Mac & Linux | |
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | |
uses: WebFreak001/[email protected] | |
with: | |
upload_url: https://uploads.github.com/repos/gamercade-io/gamercade_console/releases/73475292/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part | |
release_id: 73475292 # same as above (id can just be taken out the upload_url, it's used to find old releases) | |
asset_path: ./target/release/editor | |
asset_name: gamercade_editor-${{ matrix.release_suffix }} | |
asset_content_type: application/zip # required by GitHub API | |
- name: Publish Editor for Windows | |
if: matrix.os == 'windows-latest' | |
uses: WebFreak001/[email protected] | |
with: | |
upload_url: https://uploads.github.com/repos/gamercade-io/gamercade_console/releases/73475292/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part | |
release_id: 73475292 # same as above (id can just be taken out the upload_url, it's used to find old releases) | |
asset_path: ./target/release/editor.exe | |
asset_name: gamercade_editor-${{ matrix.release_suffix }}.exe | |
asset_content_type: application/zip # required by GitHub API | |
- name: Publish gccl for Mac & Linux | |
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | |
uses: WebFreak001/[email protected] | |
with: | |
upload_url: https://uploads.github.com/repos/gamercade-io/gamercade_console/releases/73475292/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part | |
release_id: 73475292 # same as above (id can just be taken out the upload_url, it's used to find old releases) | |
asset_path: ./target/release/gccl | |
asset_name: gccl-${{ matrix.release_suffix }} | |
asset_content_type: application/zip # required by GitHub API | |
- name: Publish gccl for Windows | |
if: matrix.os == 'windows-latest' | |
uses: WebFreak001/[email protected] | |
with: | |
upload_url: https://uploads.github.com/repos/gamercade-io/gamercade_console/releases/73475292/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part | |
release_id: 73475292 # same as above (id can just be taken out the upload_url, it's used to find old releases) | |
asset_path: ./target/release/gccl.exe | |
asset_name: gccl-${{ matrix.release_suffix }}.exe | |
asset_content_type: application/zip # required by GitHub API | |
- name: Publish App for Mac & Linux | |
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | |
uses: WebFreak001/[email protected] | |
with: | |
upload_url: https://uploads.github.com/repos/gamercade-io/gamercade_console/releases/73475292/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part | |
release_id: 73475292 # same as above (id can just be taken out the upload_url, it's used to find old releases) | |
asset_path: ./target/release/app | |
asset_name: gamercade_app-${{ matrix.release_suffix }} | |
asset_content_type: application/zip # required by GitHub API | |
- name: Publish App for Windows | |
if: matrix.os == 'windows-latest' | |
uses: WebFreak001/[email protected] | |
with: | |
upload_url: https://uploads.github.com/repos/gamercade-io/gamercade_console/releases/73475292/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part | |
release_id: 73475292 # same as above (id can just be taken out the upload_url, it's used to find old releases) | |
asset_path: ./target/release/app.exe | |
asset_name: gamercade_app-${{ matrix.release_suffix }}.exe | |
asset_content_type: application/zip # required by GitHub API |