Skip to content

Commit

Permalink
ci: publish binary for testnet and mainnet (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
shekohex authored Mar 19, 2024
1 parent 7e1b017 commit e00427b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:

- name: Rust Cache
uses: Swatinem/[email protected]

- name: Install Protobuf
run: sudo apt-get install protobuf-compiler

Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/publish-release-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ jobs:
build:
name: Publish binaries
runs-on: ubuntu-20.04
strategy:
matrix:
features: [testnet, default, txpool]

steps:
- uses: actions/checkout@v3
Expand All @@ -28,25 +31,25 @@ jobs:
run: sudo apt-get install protobuf-compiler

- name: Build binary
run: cargo build --release -p tangle --locked --features testnet

- name: Upload testnet binary to release
run: cargo build --release -p tangle --locked --features ${{ matrix.features }}

- name: Calculate SHA256
run: sha256sum target/release/tangle > target/release/tangle.sha256sum

- name: Upload ${{ matrix.features }} binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/tangle
asset_name: tangle-testnet-linux-amd64
asset_name: tangle-${{ matrix.features }}-linux-amd64
tag: ${{ github.ref }}
overwrite: true

- name: Build binary with txpool
run: cargo build --release -p tangle --locked --features txpool

- name: Upload txpool binaries to release
- name: Uplaod SHA256 of the binary
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/tangle
asset_name: tangle-txpool-linux-amd64
file: target/release/tangle.sha256sum
asset_name: tangle-${{ matrix.features }}-linux-amd64.sha256sum
tag: ${{ github.ref }}
overwrite: true
overwrite: true

0 comments on commit e00427b

Please sign in to comment.