Skip to content

Commit bafbdc0

Browse files
committed
Try creating RPM packages
Fixes #98
1 parent 30a55a0 commit bafbdc0

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ jobs:
3333
- name: Install cargo-deb
3434
run: cargo install cargo-deb
3535

36+
- name: Install cargo-generate-rpm
37+
run: cargo install cargo-generate-rpm
38+
3639
- name: Install cargo-zigbuild
3740
run: cargo install cargo-zigbuild
3841

@@ -73,6 +76,16 @@ jobs:
7376
rustup target add aarch64-unknown-linux-musl
7477
env RUSTFLAGS="-C strip=symbols" cargo deb --no-strip --cargo-build=zigbuild --target=aarch64-unknown-linux-musl
7578
79+
- name: RPM packages
80+
run: |
81+
rustup target add x86_64-unknown-linux-gnu
82+
env RUSTFLAGS="-C strip=symbols" cargo-zigbuild build --target=x86_64-unknown-linux-gnu.2.17 --release
83+
mv target/x86_64-unknown-linux-musl/release/doh-proxy target/release/
84+
cargo generate-rpm --target x86_64-unknown-linux-gnu
85+
rustup target add aarch64-unknown-linux-gnu
86+
env RUSTFLAGS="-C strip=symbols" cargo-zigbuild build --target=aarch64-unknown-linux-gnu.2.17 --release
87+
cargo generate-rpm --target aarch64-unknown-linux-gnu
88+
7689
- name: Create release
7790
id: create_release
7891
uses: actions/create-release@v1
@@ -95,6 +108,28 @@ jobs:
95108
asset_path: "target/x86_64-unknown-linux-musl/debian/doh-proxy_${{ steps.get_version.outputs.VERSION }}_amd64.deb"
96109
asset_content_type: application/x-debian-package
97110

111+
- name: Upload RPM package for x86_64
112+
id: upload-release-asset-rpm-x86_64
113+
uses: actions/upload-release-asset@v1
114+
env:
115+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
116+
with:
117+
upload_url: ${{ steps.create_release.outputs.upload_url }}
118+
asset_name: "doh-proxy-${{ steps.get_version.outputs.VERSION }}-1.x86_64.rpm"
119+
asset_path: "target/x86_64-unknown-linux-gnu/generate-rpm/doh-proxy-${{ steps.get_version.outputs.VERSION }}-1.x86_64.rpm"
120+
asset_content_type: application/x-redhat-package-manager
121+
122+
- name: Upload RPM package for aarch64
123+
id: upload-release-asset-rpm-aarch64
124+
uses: actions/upload-release-asset@v1
125+
env:
126+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
127+
with:
128+
upload_url: ${{ steps.create_release.outputs.upload_url }}
129+
asset_name: "doh-proxy-${{ steps.get_version.outputs.VERSION }}-1.aarch64.rpm"
130+
asset_path: "target/aarch64-unknown-linux-gnu/generate-rpm/doh-proxy-${{ steps.get_version.outputs.VERSION }}-1.aarch64.rpm"
131+
asset_content_type: application/x-redhat-package-manager
132+
98133
- name: Upload tarball for linux-x86_64
99134
id: upload-release-asset-tarball-linux-x86_64
100135
uses: actions/upload-release-asset@v1

0 commit comments

Comments
 (0)