Skip to content

Publish [email protected]

Publish [email protected] #252

Workflow file for this run

name: Main
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
JS_PACKAGES: "['clients-js']"
SBPF_PROGRAM_PACKAGES: "['program']"
RUST_PACKAGES: "['clients-rust', 'program']"
BENCH_PACKAGES: "['program']"
REGRESSION_PACKAGES: "['program']"
jobs:
set_env:
name: Set variables to be used in strategy definitions in reusable workflow
runs-on: ubuntu-latest
outputs:
JS_PACKAGES: ${{ steps.compute.outputs.JS_PACKAGES }}
SBPF_PROGRAM_PACKAGES: ${{ steps.compute.outputs.SBPF_PROGRAM_PACKAGES }}
RUST_PACKAGES: ${{ steps.compute.outputs.RUST_PACKAGES }}
WASM_PACKAGES: ${{ steps.compute.outputs.WASM_PACKAGES }}
BENCH_PACKAGES: ${{ steps.compute.outputs.BENCH_PACKAGES }}
REGRESSION_PACKAGES: ${{ steps.compute.outputs.REGRESSION_PACKAGES }}
RUST_TOOLCHAIN_NIGHTLY: ${{ steps.compute.outputs.RUST_TOOLCHAIN_NIGHTLY }}
SOLANA_CLI_VERSION: ${{ steps.compute.outputs.SOLANA_CLI_VERSION }}
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: Compute variables
id: compute
shell: bash
run: |
echo "JS_PACKAGES=${{ env.JS_PACKAGES }}" >> $GITHUB_OUTPUT
echo "SBPF_PROGRAM_PACKAGES=${{ env.SBPF_PROGRAM_PACKAGES }}" >> $GITHUB_OUTPUT
echo "RUST_PACKAGES=${{ env.RUST_PACKAGES }}" >> $GITHUB_OUTPUT
echo "WASM_PACKAGES=${{ env.WASM_PACKAGES }}" >> $GITHUB_OUTPUT
echo "BENCH_PACKAGES=${{ env.BENCH_PACKAGES }}" >> $GITHUB_OUTPUT
echo "REGRESSION_PACKAGES=${{ env.REGRESSION_PACKAGES }}" >> $GITHUB_OUTPUT
echo "RUST_TOOLCHAIN_NIGHTLY=$(make rust-toolchain-nightly)" >> "$GITHUB_OUTPUT"
echo "SOLANA_CLI_VERSION=$(make solana-cli-version)" >> "$GITHUB_OUTPUT"
main:
needs: set_env
uses: solana-program/actions/.github/workflows/main.yml@main
with:
js-packages: ${{ needs.set_env.outputs.JS_PACKAGES }}
sbpf-program-packages: ${{ needs.set_env.outputs.SBPF_PROGRAM_PACKAGES }}
rust-packages: ${{ needs.set_env.outputs.RUST_PACKAGES }}
wasm-packages: ${{ needs.set_env.outputs.WASM_PACKAGES }}
bench-packages: ${{ needs.set_env.outputs.BENCH_PACKAGES }}
regression-packages: ${{ needs.set_env.outputs.REGRESSION_PACKAGES }}
rustfmt-toolchain: ${{ needs.set_env.outputs.RUST_TOOLCHAIN_NIGHTLY }}
clippy-toolchain: ${{ needs.set_env.outputs.RUST_TOOLCHAIN_NIGHTLY }}
solana-cli-version: ${{ needs.set_env.outputs.SOLANA_CLI_VERSION }}