-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish Debian package with Git Tag to Github Release (#50)
- Loading branch information
1 parent
ff03776
commit b508d89
Showing
5 changed files
with
67 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: build and test | ||
name: Nexus build and test | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: build and test | ||
name: Flow build and test | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Stable Debian package | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
|
||
jobs: | ||
release: | ||
name: build and release | ||
runs-on: ubuntu-latest-16-cores | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: checkout sources | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
token: ${{ secrets.SUBMODULE_CHECKOUT }} | ||
|
||
- name: install system tools | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y musl-tools protobuf-compiler gcc-multilib \ | ||
protobuf-compiler libssl-dev pkg-config build-essential | ||
- name: install cargo binstall | ||
run: | | ||
curl -L --proto '=https' --tlsv1.2 -sSf\ | ||
https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash | ||
- name: install cargo binaries | ||
run: | | ||
cargo binstall --no-confirm --no-symlinks cargo-deb cargo-zigbuild | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
targets: x86_64-unknown-linux-musl | ||
|
||
- uses: goto-bus-stop/setup-zig@v2 | ||
|
||
- name: Set Cargo version as Git tag | ||
working-directory: ./nexus/server | ||
run: | | ||
export VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//') | ||
sed -i "s/0.1.0/$VERSION/g" Cargo.toml | ||
- name: build project release | ||
working-directory: ./nexus | ||
run: cargo zigbuild --release --target=x86_64-unknown-linux-musl | ||
|
||
- name: create peerdb-server deb package | ||
working-directory: ./nexus/ | ||
run: cargo deb --target=x86_64-unknown-linux-musl -p peerdb-server --no-build | ||
|
||
- name: upload release artifacts | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
nexus/target/x86_64-unknown-linux-musl/debian/peerdb-server*.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters