Skip to content

Commit

Permalink
fix: release actions
Browse files Browse the repository at this point in the history
  • Loading branch information
arrudagates committed Nov 9, 2023
1 parent 2aa6fb7 commit be93833
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/release-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ on:
jobs:
build_binary:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./${{ github.event.inputs.chain }}

steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -34,15 +39,15 @@ jobs:
run: sudo apt install -y git clang curl libssl-dev llvm libudev-dev protobuf-compiler

- name: Install & display rust toolchain
run: cd ${{ github.event.inputs.chain }} && rustup show
run: rustup show

- name: Build binary
run: cd ${{ github.event.inputs.chain }} && cargo build --release
run: cargo build --release

- name: Add binary to release
uses: djnicholson/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag-name: ${{ github.ref_name }}
asset-name: '${{ github.event.inputs.chain }}-collator'
file: '${{ github.event.inputs.chain }}/target/release/${{ github.event.inputs.chain }}-collator'
file: 'target/release/${{ github.event.inputs.chain }}-collator'
20 changes: 12 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,17 @@ jobs:
release:
name: Build and publish ${{ github.event.inputs.chain }}
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./${{ github.event.inputs.chain }}

steps:
- name: Checkout Codebase
uses: actions/checkout@v3
with:
submodules: true

- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet
Expand All @@ -54,17 +64,11 @@ jobs:
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
df -h
# Checkout the codebase
- name: Checkout Codebase
uses: actions/checkout@v3
with:
submodules: true

- name: Install deps
run: sudo apt -y install protobuf-compiler

- name: Install & display rust toolchain
run: cd ${{ github.event.inputs.chain }} && rustup show
run: rustup show

# Build WASM with Substrate Runtime Tool
- name: Srtool build
Expand All @@ -74,7 +78,7 @@ jobs:
BUILD_OPTS: ""
with:
chain: ${{ github.event.inputs.chain }}
runtime_dir: ${{ matrix.chain }}/runtime
runtime_dir: ./${{ github.event.inputs.chain }}/runtime
tag: ${{ github.event.inputs.srtool_image }}

# Output the build summary
Expand Down

0 comments on commit be93833

Please sign in to comment.