Skip to content

Commit 092a079

Browse files
committed
fix publishing workflow
1 parent d32bbd0 commit 092a079

File tree

2 files changed

+20
-21
lines changed

2 files changed

+20
-21
lines changed

.github/workflows/publish.yml

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,36 +40,28 @@ jobs:
4040
target: aarch64-apple-darwin
4141
runs-on: ${{ matrix.os }}
4242
steps:
43-
- name: Install packages (Linux)
44-
if: runner.os == 'Linux'
45-
uses: awalsh128/[email protected]
46-
with:
47-
packages: libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev libgtk-3-dev # libgtk-3-dev is used by rfd
48-
version: 1.0
49-
execute_install_scripts: true
50-
- name: Install Rust
51-
uses: dtolnay/rust-toolchain@stable
52-
with:
53-
toolchain: ${{ matrix.rust }}
54-
- uses: Swatinem/rust-cache@v2
55-
- run: rustup target add ${{ matrix.target }}
43+
- uses: actions/checkout@v4
5644
- uses: actions/setup-java@v4
5745
with:
58-
distribution: 'microsoft'
59-
java-version: '21'
60-
cache: 'gradle'
46+
distribution: "microsoft"
47+
java-version: "21"
48+
cache: "gradle"
6149
- uses: gradle/actions/wrapper-validation@v3
62-
- name: Run Cargo
63-
run: cargo build --release --target ${{ matrix.target }}
50+
- uses: houseabsolute/actions-rust-cross@v1
51+
with:
52+
command: build
53+
target: ${{ matrix.target }}
54+
args: "--locked --release"
55+
strip: true
6456
- run: mv "target/${{ matrix.target }}/release/ornithe-installer-rs" "target/${{ matrix.target }}/release/ornithe-installer-rs.bin"
6557
if: runner.os != 'Windows'
6658
- uses: actions/upload-artifact@v4
6759
with:
6860
name: Artifacts ${{ matrix.target }}
6961
path: |
70-
target/${{ matrix.target }}/release/ornithe-installer-rs*
71-
!target/**/ornithe-installer-rs.d
72-
!target/**/build/
62+
target/${{ matrix.target }}/release/ornithe-installer-rs*
63+
!target/**/ornithe-installer-rs.d
64+
!target/**/build/
7365
- run: ./gradlew publish --stacktrace
7466
env:
7567
MAVEN_URL: ${{ secrets.NEW_MAVEN_URL }}

Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,10 @@ winres = "0.1.11"
3232
[profile.release]
3333
lto = true
3434
opt-level = 's'
35+
36+
[build]
37+
pre-build = [
38+
"dpkg --add-architecture $CROSS_DEB_ARCH"
39+
"apt-get update && apt-get --assume-yes install libxcb-render0-dev:$CROSS_DEB_ARCH libxcb-shape0-dev:$CROSS_DEB_ARCH libxcb-xfixes0-dev:$CROSS_DEB_ARCH libxkbcommon-dev:$CROSS_DEB_ARCH libssl-dev:$CROSS_DEB_ARCH libgtk-3-dev:$CROSS_DEB_ARCH"
40+
41+
]

0 commit comments

Comments
 (0)