3939 - uses : dtolnay/rust-toolchain@nightly
4040
4141 - run : cargo install --force cross --git https://github.com/cross-rs/cross
42+ - run : cargo install --force cargo-deb
43+ # - run: cargo install --force cargo-generate-rpm
4244
4345 - name : Find Version
4446 if : startsWith(github.ref, 'refs/tags/')
6062 - name : Build
6163 run : cross build --release --target ${{ matrix.target }}
6264
65+ - name : Build deb
66+ run : |
67+ cargo deb --no-build --no-strip --target ${{ matrix.target }} -p zia-client
68+ cargo deb --no-build --no-strip --target ${{ matrix.target }} -p zia-server
69+
70+ # - name: Build rpm
71+ # run: |
72+ # cargo generate-rpm --target ${{ matrix.target }} -p zia-client
73+ # cargo generate-rpm --target ${{ matrix.target }} -p zia-server
74+
6375 - name : Rename binary
6476 run : |
6577 mv target/${{ matrix.target }}/release/zia-client zia-client_${{ matrix.target }}
@@ -77,12 +89,24 @@ jobs:
7789 name : zia-server_${{ matrix.target }}
7890 path : zia-server_${{ matrix.target }}*
7991
92+ - name : Upload Artifact deb (client)
93+ uses : actions/upload-artifact@v3
94+ with :
95+ name : zia-client_${{ matrix.target }}.deb
96+ path : target/${{ matrix.target }}/debian/zia-client_*.deb
97+
98+ - name : Upload Artifact deb (server)
99+ uses : actions/upload-artifact@v3
100+ with :
101+ name : zia-server_${{ matrix.target }}.deb
102+ path : target/${{ matrix.target }}/debian/zia-server_*.deb
103+
80104 -
uses :
alexellis/[email protected] 81105 if : startsWith(github.ref, 'refs/tags/')
82106 env :
83107 GITHUB_TOKEN : ${{ github.token }}
84108 with :
85- asset_paths : ' ["zia-client_${{ matrix.target }}","zia-server_${{ matrix.target }}"]'
109+ asset_paths : ' ["zia-client_${{ matrix.target }}","zia-server_${{ matrix.target }}","target/${{ matrix.target }}/debian/zia-client_${{ steps.meta.outputs.version }}_*.deb","target/${{ matrix.target }}/debian/zia-server_${{ steps.meta.outputs.version }}_*.deb" ]'
86110
87111 build-native :
88112 needs : [ build ]
0 commit comments