Skip to content

Commit

Permalink
Fixed release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Nereuxofficial committed Dec 6, 2022
1 parent 098dba9 commit cc19b7f
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 48 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ env:
CARGO_TERM_COLOR: always

jobs:

build:
strategy:
matrix:
Expand Down
93 changes: 46 additions & 47 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# .github/workflows/release.yml
name: Release

on:
Expand All @@ -11,49 +10,49 @@ jobs:
matrix:
os: [ windows-2019, ubuntu-latest ]
toolchain: [ nightly ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Get Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
override: true

- name: Install alsa
if: ${{ runner.os == 'Linux' }}
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev

- name: Install udev
if: ${{ runner.os == 'Linux' }}
run: sudo apt-get update; sudo apt-get install --no-install-recommends libudev-dev

- name: Use Rust Cache
if: ${{ runner.os == 'Linux' }}
uses: Swatinem/[email protected]

- name: Run build --release
run: cargo build --release

- name: Release Linux
uses: softprops/action-gh-release@v1
if: ${{ runner.os == 'Linux' }}
with:
files: |
target/release/game
assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Release Windows
uses: softprops/action-gh-release@v1
if: ${{ runner.os == 'Windows' }}
with:
files: |
target/release/game.exe
assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Get Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
override: true

- name: Install alsa
if: ${{ runner.os == 'Linux' }}
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev

- name: Install udev
if: ${{ runner.os == 'Linux' }}
run: sudo apt-get update; sudo apt-get install --no-install-recommends libudev-dev

- name: Use Rust Cache
if: ${{ runner.os == 'Linux' }}
uses: Swatinem/[email protected]

- name: Run build --release
run: cargo build --release

- name: Release Linux
uses: softprops/action-gh-release@v1
if: ${{ runner.os == 'Linux' }}
with:
files: |
target/release/game
assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Release Windows
uses: softprops/action-gh-release@v1
if: ${{ runner.os == 'Windows' }}
with:
files: |
target/release/game.exe
assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit cc19b7f

Please sign in to comment.