83 lines
2.4 KiB
YAML
83 lines
2.4 KiB
YAML
name: Push Full Build
|
|
permissions:
|
|
contents: write
|
|
on:
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
release:
|
|
types: [ published ]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
determine-network:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
chain-network: ${{ steps.get_branch.outputs.chain_network }}
|
|
steps:
|
|
- name: Get release information from API
|
|
id: get_branch
|
|
run: |
|
|
# Use the GitHub CLI to get the release details by tag name
|
|
# The result is a JSON object
|
|
RELEASE_INFO=$(gh release view --json targetCommitish -t ${{ github.ref_name }})
|
|
|
|
# Extract the target commitish (the source branch)
|
|
SOURCE_BRANCH=$(echo "$RELEASE_INFO" | jq -r '.targetCommitish')
|
|
|
|
# Set the chain network based on the source branch
|
|
if [ "$SOURCE_BRANCH" == "dev" ]; then
|
|
echo "chain_network=testnet" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "chain_network=mainnet" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
echo "Source Branch: $SOURCE_BRANCH"
|
|
echo "Chain Network: ${{ steps.get_branch.outputs.chain_network }}"
|
|
|
|
build-linux-intel:
|
|
name: Chain
|
|
uses: ./.github/workflows/build-linux-intel.yml
|
|
secrets: inherit
|
|
with:
|
|
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
|
|
|
build-linux-arm:
|
|
name: Chain
|
|
uses: ./.github/workflows/build-linux-arm64.yml
|
|
secrets: inherit
|
|
with:
|
|
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
|
|
|
build-windows-intel:
|
|
name: Chain
|
|
uses: ./.github/workflows/build-windows-intel.yml
|
|
with:
|
|
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
|
|
|
build-macos-arm64:
|
|
name: Chain
|
|
uses: ./.github/workflows/build-macos-arm64.yml
|
|
secrets: inherit
|
|
with:
|
|
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
|
|
|
build-macos-intel:
|
|
name: Chain
|
|
uses: ./.github/workflows/build-macos-intel.yml
|
|
secrets: inherit
|
|
with:
|
|
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
|
|
|
build-docker:
|
|
name: Docker
|
|
uses: ./.github/workflows/build-docker.yml
|
|
secrets: inherit
|
|
with:
|
|
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
|
|
|
build-docs:
|
|
name: Docs
|
|
uses: ./.github/workflows/build-docs.yml
|