Fix todos
build workflow
This commit is contained in:
parent
7016221556
commit
92af1b1c12
30
.github/workflows/build.yml
vendored
30
.github/workflows/build.yml
vendored
@ -15,29 +15,15 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "[profile.release]" >> Cargo.toml
|
echo "[profile.release]" >> Cargo.toml
|
||||||
echo "lto = true" >> Cargo.toml
|
echo "lto = true" >> Cargo.toml
|
||||||
- name: Add .deb package metadata
|
|
||||||
run: |
|
|
||||||
echo '[package.metadata.deb.variants.todos]' >> Cargo.toml
|
|
||||||
echo 'extended-description = "A simple Todo app built with Iced, a cross-platform GUI library for Rust"' >> Cargo.toml
|
|
||||||
echo 'assets = [' >> Cargo.toml
|
|
||||||
echo '["target/release/examples/todos", "usr/bin/iced-todos", "755"],' >> Cargo.toml
|
|
||||||
echo '["iced-todos.desktop", "usr/share/applications/", "644"]' >> Cargo.toml
|
|
||||||
echo ']' >> Cargo.toml
|
|
||||||
- name: Create .desktop file
|
|
||||||
run: |
|
|
||||||
echo '[Desktop Entry]' >> iced-todos.desktop
|
|
||||||
echo 'Name=Todos - Iced' >> iced-todos.desktop
|
|
||||||
echo 'Exec=iced-todos' >> iced-todos.desktop
|
|
||||||
echo 'Type=Application' >> iced-todos.desktop
|
|
||||||
- name: Build todos binary
|
- name: Build todos binary
|
||||||
run: cargo build --verbose --release --example todos
|
run: cargo build --verbose --release --package todos
|
||||||
- name: Archive todos binary
|
- name: Archive todos binary
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: todos-x86_64-unknown-linux-gnu
|
name: todos-x86_64-unknown-linux-gnu
|
||||||
path: target/release/examples/todos
|
path: target/release/todos
|
||||||
- name: Build todos .deb package
|
- name: Pack todos .deb package
|
||||||
run: cargo deb --variant todos -- --example todos
|
run: cargo deb --no-build --package todos
|
||||||
- name: Rename todos .deb package
|
- name: Rename todos .deb package
|
||||||
run: mv target/debian/*.deb target/debian/iced_todos-x86_64-debian-linux-gnu.deb
|
run: mv target/debian/*.deb target/debian/iced_todos-x86_64-debian-linux-gnu.deb
|
||||||
- name: Archive todos .deb package
|
- name: Archive todos .deb package
|
||||||
@ -61,12 +47,12 @@ jobs:
|
|||||||
echo '[target.x86_64-pc-windows-msvc]' >> .cargo/config
|
echo '[target.x86_64-pc-windows-msvc]' >> .cargo/config
|
||||||
echo 'rustflags = ["-Ctarget-feature=+crt-static"]' >> .cargo/config
|
echo 'rustflags = ["-Ctarget-feature=+crt-static"]' >> .cargo/config
|
||||||
- name: Build todos binary
|
- name: Build todos binary
|
||||||
run: cargo build --verbose --release --example todos
|
run: cargo build --verbose --release --package todos
|
||||||
- name: Archive todos binary
|
- name: Archive todos binary
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: todos-x86_64-pc-windows-msvc
|
name: todos-x86_64-pc-windows-msvc
|
||||||
path: target/release/examples/todos.exe
|
path: target/release/todos.exe
|
||||||
|
|
||||||
todos_macos:
|
todos_macos:
|
||||||
runs-on: macOS-latest
|
runs-on: macOS-latest
|
||||||
@ -80,9 +66,9 @@ jobs:
|
|||||||
- name: Build todos binary
|
- name: Build todos binary
|
||||||
env:
|
env:
|
||||||
MACOSX_DEPLOYMENT_TARGET: 10.14
|
MACOSX_DEPLOYMENT_TARGET: 10.14
|
||||||
run: cargo build --verbose --release --example todos
|
run: cargo build --verbose --release --package todos
|
||||||
- name: Archive todos binary
|
- name: Archive todos binary
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: todos-x86_64-apple-darwin
|
name: todos-x86_64-apple-darwin
|
||||||
path: target/release/examples/todos
|
path: target/release/todos
|
||||||
|
@ -5,8 +5,6 @@ authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
iced = { path = "../.." }
|
iced = { path = "../.." }
|
||||||
iced_futures = { path = "../../futures", features = ["async-std"] }
|
iced_futures = { path = "../../futures", features = ["async-std"] }
|
||||||
@ -14,3 +12,9 @@ async-std = "1.0"
|
|||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
directories = "2.0"
|
directories = "2.0"
|
||||||
|
|
||||||
|
[package.metadata.deb]
|
||||||
|
assets = [
|
||||||
|
["target/release/todos", "usr/bin/iced-todos", "755"],
|
||||||
|
["iced-todos.desktop", "usr/share/applications/", "644"],
|
||||||
|
]
|
||||||
|
4
examples/todos/iced-todos.desktop
Normal file
4
examples/todos/iced-todos.desktop
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=Todos - Iced
|
||||||
|
Exec=iced-todos
|
||||||
|
Type=Application
|
Loading…
Reference in New Issue
Block a user