diff --git a/.github/workflows/actions/use-nodes/action.yml b/.github/workflows/actions/use-nodes/action.yml index afbfe7584d..b1785f9067 100644 --- a/.github/workflows/actions/use-nodes/action.yml +++ b/.github/workflows/actions/use-nodes/action.yml @@ -17,6 +17,12 @@ runs: workflow: build-nodes.yml name: nightly-polkadot-binary + - name: decompress polkadot binary + shell: bash + run: | + tar -xzvf ./polkadot.tar.gz + cp ./target/release/polkadot ./polkadot + - name: Prepare binaries shell: bash run: | diff --git a/.github/workflows/build-nodes.yml b/.github/workflows/build-nodes.yml index 045355e8ea..9abd2a05fd 100644 --- a/.github/workflows/build-nodes.yml +++ b/.github/workflows/build-nodes.yml @@ -35,6 +35,17 @@ jobs: command: build args: --release --manifest-path substrate/bin/node/cli/Cargo.toml + - name: build polkadot binary + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --manifest-path polkadot/Cargo.toml + + - name: Strip binaries + run: | + cargo install cargo-strip + cargo strip + - name: upload substrate binary uses: actions/upload-artifact@v3 with: @@ -43,18 +54,17 @@ jobs: retention-days: 2 if-no-files-found: error - - name: build polkadot binary - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --manifest-path polkadot/Cargo.toml + # Note: Uncompressed polkadot binary is ~124MB -> too large for git (max 100MB) without git lfs. Compressed it is only ~45MB + - name: compress polkadot binary + run: | + tar -zcvf target/release/polkadot.tar.gz target/release/polkadot - name: upload polkadot binary uses: actions/upload-artifact@v3 with: name: nightly-polkadot-binary path: | - target/release/polkadot + target/release/polkadot.tar.gz target/release/polkadot-execute-worker target/release/polkadot-prepare-worker retention-days: 2 diff --git a/.github/workflows/update-artifacts.yml b/.github/workflows/update-artifacts.yml index 03a9e53806..49c2a86d18 100644 --- a/.github/workflows/update-artifacts.yml +++ b/.github/workflows/update-artifacts.yml @@ -19,7 +19,6 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v4 - # We run this (up-to-date) node locally to fetch metadata from it for the artifacts - name: Use substrate and polkadot node binaries uses: ./.github/workflows/actions/use-nodes @@ -45,9 +44,16 @@ jobs: - name: Delete substrate node binary run: rm ./substrate-node + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ secrets.SUBXT_PR_MAKER_APP_ID }} + private-key: ${{ secrets.SUBXT_PR_MAKER_APP_KEY }} + - name: Create Pull Request uses: peter-evans/create-pull-request@v6 with: + token: ${{ steps.app-token.outputs.token }} base: master branch: update-artifacts commit-message: Update Artifacts (auto-generated)