mirror of
https://github.com/Xevion/rust-sdl2-emscripten.git
synced 2025-12-06 13:16:21 -06:00
extend binstall version getters & artifact name interpolation into linux/windows builds
This commit is contained in:
32
.github/workflows/build.yaml
vendored
32
.github/workflows/build.yaml
vendored
@@ -50,6 +50,8 @@ jobs:
|
|||||||
|
|
||||||
linux:
|
linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
TARGET: x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -61,7 +63,7 @@ jobs:
|
|||||||
- name: Setup Rust Toolchain (Linux)
|
- name: Setup Rust Toolchain (Linux)
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
target: x86_64-unknown-linux-gnu
|
target: ${{ env.TARGET }}
|
||||||
|
|
||||||
- name: Rust Cache
|
- name: Rust Cache
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
@@ -76,11 +78,19 @@ jobs:
|
|||||||
chmod a+x /tmp/example/spiritus
|
chmod a+x /tmp/example/spiritus
|
||||||
mkdir /tmp/example/assets
|
mkdir /tmp/example/assets
|
||||||
cp ./assets/TerminalVector.ttf ./assets/fruit.png /tmp/example/assets
|
cp ./assets/TerminalVector.ttf ./assets/fruit.png /tmp/example/assets
|
||||||
|
|
||||||
|
- name: Install Cargo Binstall
|
||||||
|
uses: cargo-bins/cargo-binstall@main
|
||||||
|
|
||||||
|
- name: Acquire Package Version
|
||||||
|
run: |
|
||||||
|
cargo binstall toml-cli -y
|
||||||
|
echo "PACKAGE_VERSION=$(toml get ./Cargo.toml package.version --raw)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Linux_x64
|
name: "spiritus-${{ env.PACKAGE_VERSION }}-${{ env.TARGET }}"
|
||||||
path: /tmp/example/
|
path: /tmp/example/
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
@@ -132,12 +142,13 @@ jobs:
|
|||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
env:
|
env:
|
||||||
|
TARGET: x86_64-pc-windows-gnu
|
||||||
SDL2: 2.30.2
|
SDL2: 2.30.2
|
||||||
SDL2_TTF: 2.22.0
|
SDL2_TTF: 2.22.0
|
||||||
SDL2_MIXER: 2.8.0
|
SDL2_MIXER: 2.8.0
|
||||||
SDL2_IMAGE: 2.8.2
|
SDL2_IMAGE: 2.8.2
|
||||||
SDL2_GFX: 1.0.4
|
# SDL2_GFX: 1.0.4
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -178,7 +189,7 @@ jobs:
|
|||||||
- name: Setup Rust (Windows)
|
- name: Setup Rust (Windows)
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
targets: x86_64-pc-windows-gnu
|
targets: ${{ env.TARGET }}
|
||||||
|
|
||||||
- name: Rust Cache
|
- name: Rust Cache
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
@@ -194,10 +205,19 @@ jobs:
|
|||||||
New-Item -Type Directory ./release/assets/
|
New-Item -Type Directory ./release/assets/
|
||||||
Move-Item -Path ./assets/TerminalVector.ttf, ./assets/fruit.png -Destination ./release/assets/
|
Move-Item -Path ./assets/TerminalVector.ttf, ./assets/fruit.png -Destination ./release/assets/
|
||||||
|
|
||||||
|
- name: Install Cargo Binstall
|
||||||
|
uses: cargo-bins/cargo-binstall@main
|
||||||
|
|
||||||
|
- name: Acquire Package Version
|
||||||
|
run: |
|
||||||
|
cargo binstall toml-cli -y
|
||||||
|
echo "PACKAGE_VERSION=$(toml get ./Cargo.toml package.version --raw)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Windows_x64
|
name: "spiritus-${{ env.PACKAGE_VERSION }}-${{ env.TARGET }}"
|
||||||
path: ./release/
|
path: ./release/
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
Reference in New Issue
Block a user