mirror of
https://github.com/Xevion/rust-sdl2-emscripten.git
synced 2025-12-05 23:16:13 -06:00
try: MacOS build with package version & target interpolation
This commit is contained in:
12
.github/workflows/build.yaml
vendored
12
.github/workflows/build.yaml
vendored
@@ -87,6 +87,8 @@ jobs:
|
|||||||
|
|
||||||
macos:
|
macos:
|
||||||
runs-on: macos-13
|
runs-on: macos-13
|
||||||
|
env:
|
||||||
|
TARGET: x86_64-apple-darwin
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -98,7 +100,7 @@ jobs:
|
|||||||
- name: Setup Rust Toolchain (MacOS)
|
- name: Setup Rust Toolchain (MacOS)
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
target: x86_64-apple-darwin
|
target: ${{ env.TARGET }}
|
||||||
|
|
||||||
- name: Rust Cache
|
- name: Rust Cache
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
@@ -110,14 +112,18 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir /tmp/example/
|
mkdir /tmp/example/
|
||||||
cp ./target/release/spiritus /tmp/example/
|
cp ./target/release/spiritus /tmp/example/
|
||||||
chmod a+x /tmp/example/spiritus
|
|
||||||
mkdir /tmp/example/assets
|
mkdir /tmp/example/assets
|
||||||
cp ./assets/TerminalVector.ttf ./assets/tetris.ogg ./assets/fruit.png /tmp/example/assets
|
cp ./assets/TerminalVector.ttf ./assets/tetris.ogg ./assets/fruit.png /tmp/example/assets
|
||||||
|
|
||||||
|
- name: Acquire Package Version
|
||||||
|
run: |
|
||||||
|
cargo install toml-cli
|
||||||
|
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: MacOS_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
|
||||||
|
|||||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -276,7 +276,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "spiritus"
|
name = "spiritus"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atty",
|
"atty",
|
||||||
"colors-transform",
|
"colors-transform",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "spiritus"
|
name = "spiritus"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|||||||
Reference in New Issue
Block a user