Release Build #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Build | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Release tag (e.g., 1.8.0)' | |
| required: false | |
| default: '' | |
| jobs: | |
| build-linux: | |
| name: Build Linux x86_64 | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 120 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential libtool autotools-dev automake \ | |
| pkg-config bsdmainutils python3 curl cmake bison git | |
| - name: Determine version | |
| id: version | |
| run: | | |
| MAJOR=$(grep '^define(_ALPHA_CLIENT_VERSION_MAJOR' configure.ac | head -1 | grep -o '[0-9]*') | |
| MINOR=$(grep '^define(_ALPHA_CLIENT_VERSION_MINOR' configure.ac | head -1 | grep -o '[0-9]*') | |
| BUILD=$(grep '^define(_ALPHA_CLIENT_VERSION_BUILD' configure.ac | head -1 | grep -o '[0-9]*') | |
| CODENAME=$(grep '^define(_ALPHA_CLIENT_RELEASE_NAME_MAJOR' configure.ac | head -1 | sed 's/.*\[\(.*\)\].*/\1/') | |
| CORE_MAJOR=$(grep '^define(_CLIENT_VERSION_MAJOR' configure.ac | grep -v ALPHA | head -1 | grep -o '[0-9]*') | |
| CORE_MINOR=$(grep '^define(_CLIENT_VERSION_MINOR' configure.ac | grep -v ALPHA | head -1 | grep -o '[0-9]*') | |
| CORE_BUILD=$(grep '^define(_CLIENT_VERSION_BUILD' configure.ac | grep -v ALPHA | head -1 | grep -o '[0-9]*') | |
| PKG_VERSION="${MAJOR}.${MINOR}.${BUILD}-${CODENAME}-core-${CORE_MAJOR}.${CORE_MINOR}.${CORE_BUILD}" | |
| echo "PKG_VERSION=${PKG_VERSION}" >> $GITHUB_OUTPUT | |
| echo "Package version: ${PKG_VERSION}" | |
| - name: Cache depends | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| depends/built | |
| depends/sources | |
| key: depends-linux-x86_64-${{ hashFiles('depends/packages/*.mk') }} | |
| restore-keys: depends-linux-x86_64- | |
| - name: Build depends | |
| run: make -C depends NO_QT=1 -j$(nproc) | |
| - name: Build Alpha | |
| run: | | |
| ./autogen.sh | |
| ./configure --without-gui --prefix=$PWD/depends/x86_64-pc-linux-gnu \ | |
| --program-transform-name='s/bitcoin/alpha/g' | |
| make -j$(nproc) | |
| make install | |
| - name: Package | |
| run: | | |
| ARTIFACT_NAME="alpha-${{ steps.version.outputs.PKG_VERSION }}-x86_64-pc-linux-gnu" | |
| mkdir -p "${ARTIFACT_NAME}/bin" | |
| cp depends/x86_64-pc-linux-gnu/bin/alphad "${ARTIFACT_NAME}/bin/" | |
| cp depends/x86_64-pc-linux-gnu/bin/alpha-cli "${ARTIFACT_NAME}/bin/" | |
| cp depends/x86_64-pc-linux-gnu/bin/alpha-tx "${ARTIFACT_NAME}/bin/" | |
| cp depends/x86_64-pc-linux-gnu/bin/alpha-wallet "${ARTIFACT_NAME}/bin/" | |
| cp depends/x86_64-pc-linux-gnu/bin/alpha-util "${ARTIFACT_NAME}/bin/" | |
| cp COPYING "${ARTIFACT_NAME}/" | |
| tar czf "${ARTIFACT_NAME}.tgz" "${ARTIFACT_NAME}" | |
| echo "ARTIFACT=${ARTIFACT_NAME}.tgz" >> $GITHUB_ENV | |
| - name: Upload release asset | |
| if: github.event_name == 'release' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: ${{ env.ARTIFACT }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-x86_64 | |
| path: ${{ env.ARTIFACT }} | |
| build-windows: | |
| name: Build Windows x64 | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 180 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential libtool autotools-dev automake \ | |
| pkg-config bsdmainutils python3 curl cmake bison git \ | |
| g++-mingw-w64-x86-64 | |
| sudo update-alternatives --set x86_64-w64-mingw32-g++ \ | |
| /usr/bin/x86_64-w64-mingw32-g++-posix | |
| - name: Determine version | |
| id: version | |
| run: | | |
| MAJOR=$(grep '^define(_ALPHA_CLIENT_VERSION_MAJOR' configure.ac | head -1 | grep -o '[0-9]*') | |
| MINOR=$(grep '^define(_ALPHA_CLIENT_VERSION_MINOR' configure.ac | head -1 | grep -o '[0-9]*') | |
| BUILD=$(grep '^define(_ALPHA_CLIENT_VERSION_BUILD' configure.ac | head -1 | grep -o '[0-9]*') | |
| CODENAME=$(grep '^define(_ALPHA_CLIENT_RELEASE_NAME_MAJOR' configure.ac | head -1 | sed 's/.*\[\(.*\)\].*/\1/') | |
| CORE_MAJOR=$(grep '^define(_CLIENT_VERSION_MAJOR' configure.ac | grep -v ALPHA | head -1 | grep -o '[0-9]*') | |
| CORE_MINOR=$(grep '^define(_CLIENT_VERSION_MINOR' configure.ac | grep -v ALPHA | head -1 | grep -o '[0-9]*') | |
| CORE_BUILD=$(grep '^define(_CLIENT_VERSION_BUILD' configure.ac | grep -v ALPHA | head -1 | grep -o '[0-9]*') | |
| PKG_VERSION="${MAJOR}.${MINOR}.${BUILD}-${CODENAME}-core-${CORE_MAJOR}.${CORE_MINOR}.${CORE_BUILD}" | |
| echo "PKG_VERSION=${PKG_VERSION}" >> $GITHUB_OUTPUT | |
| - name: Cache depends | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| depends/built | |
| depends/sources | |
| key: depends-win64-${{ hashFiles('depends/packages/*.mk') }} | |
| restore-keys: depends-win64- | |
| - name: Build depends | |
| run: make HOST=x86_64-w64-mingw32 -C depends NO_QT=1 -j$(nproc) | |
| - name: Build Alpha | |
| run: | | |
| ./autogen.sh | |
| CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site \ | |
| ./configure --prefix=$PWD/depends/x86_64-w64-mingw32 \ | |
| --program-transform-name='s/bitcoin/alpha/g' | |
| make -j$(nproc) | |
| make install | |
| - name: Package | |
| run: | | |
| ARTIFACT_NAME="alpha-${{ steps.version.outputs.PKG_VERSION }}-win64-setup" | |
| mkdir -p "${ARTIFACT_NAME}" | |
| cp depends/x86_64-w64-mingw32/bin/alphad.exe "${ARTIFACT_NAME}/" | |
| cp depends/x86_64-w64-mingw32/bin/alpha-cli.exe "${ARTIFACT_NAME}/" | |
| cp depends/x86_64-w64-mingw32/bin/alpha-tx.exe "${ARTIFACT_NAME}/" | |
| cp depends/x86_64-w64-mingw32/bin/alpha-wallet.exe "${ARTIFACT_NAME}/" | |
| cp depends/x86_64-w64-mingw32/bin/alpha-util.exe "${ARTIFACT_NAME}/" | |
| cp COPYING "${ARTIFACT_NAME}/" | |
| zip -r "${ARTIFACT_NAME}.zip" "${ARTIFACT_NAME}" | |
| echo "ARTIFACT=${ARTIFACT_NAME}.zip" >> $GITHUB_ENV | |
| - name: Upload release asset | |
| if: github.event_name == 'release' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: ${{ env.ARTIFACT }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: win64 | |
| path: ${{ env.ARTIFACT }} | |
| build-macos: | |
| name: Build macOS aarch64 | |
| runs-on: macos-14 | |
| timeout-minutes: 180 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install dependencies | |
| run: brew install automake libtool pkg-config | |
| - name: Determine version | |
| id: version | |
| run: | | |
| MAJOR=$(grep '^define(_ALPHA_CLIENT_VERSION_MAJOR' configure.ac | head -1 | grep -o '[0-9]*') | |
| MINOR=$(grep '^define(_ALPHA_CLIENT_VERSION_MINOR' configure.ac | head -1 | grep -o '[0-9]*') | |
| BUILD=$(grep '^define(_ALPHA_CLIENT_VERSION_BUILD' configure.ac | head -1 | grep -o '[0-9]*') | |
| CODENAME=$(grep '^define(_ALPHA_CLIENT_RELEASE_NAME_MAJOR' configure.ac | head -1 | sed 's/.*\[\(.*\)\].*/\1/') | |
| CORE_MAJOR=$(grep '^define(_CLIENT_VERSION_MAJOR' configure.ac | grep -v ALPHA | head -1 | grep -o '[0-9]*') | |
| CORE_MINOR=$(grep '^define(_CLIENT_VERSION_MINOR' configure.ac | grep -v ALPHA | head -1 | grep -o '[0-9]*') | |
| CORE_BUILD=$(grep '^define(_CLIENT_VERSION_BUILD' configure.ac | grep -v ALPHA | head -1 | grep -o '[0-9]*') | |
| PKG_VERSION="${MAJOR}.${MINOR}.${BUILD}-${CODENAME}-core-${CORE_MAJOR}.${CORE_MINOR}.${CORE_BUILD}" | |
| echo "PKG_VERSION=${PKG_VERSION}" >> $GITHUB_OUTPUT | |
| - name: Cache depends | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| depends/built | |
| depends/sources | |
| key: depends-macos-aarch64-${{ hashFiles('depends/packages/*.mk') }} | |
| restore-keys: depends-macos-aarch64- | |
| - name: Build depends | |
| run: make -C depends NO_QT=1 -j$(sysctl -n hw.ncpu) | |
| - name: Build Alpha | |
| run: | | |
| ./autogen.sh | |
| MACOS_HOST=$(ls depends/ | grep apple-darwin | head -1) | |
| ./configure --without-gui --prefix=$PWD/depends/${MACOS_HOST} \ | |
| --program-transform-name='s/bitcoin/alpha/g' | |
| make -j$(sysctl -n hw.ncpu) | |
| make install | |
| - name: Package | |
| run: | | |
| MACOS_HOST=$(ls depends/ | grep apple-darwin | head -1) | |
| ARTIFACT_NAME="alpha-${{ steps.version.outputs.PKG_VERSION }}-macos-sonoma-aarch64" | |
| mkdir -p "${ARTIFACT_NAME}/bin" | |
| cp depends/${MACOS_HOST}/bin/alphad "${ARTIFACT_NAME}/bin/" | |
| cp depends/${MACOS_HOST}/bin/alpha-cli "${ARTIFACT_NAME}/bin/" | |
| cp depends/${MACOS_HOST}/bin/alpha-tx "${ARTIFACT_NAME}/bin/" | |
| cp depends/${MACOS_HOST}/bin/alpha-wallet "${ARTIFACT_NAME}/bin/" | |
| cp depends/${MACOS_HOST}/bin/alpha-util "${ARTIFACT_NAME}/bin/" | |
| cp COPYING "${ARTIFACT_NAME}/" | |
| zip -r "${ARTIFACT_NAME}.zip" "${ARTIFACT_NAME}" | |
| echo "ARTIFACT=${ARTIFACT_NAME}.zip" >> $GITHUB_ENV | |
| - name: Upload release asset | |
| if: github.event_name == 'release' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: ${{ env.ARTIFACT }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-aarch64 | |
| path: ${{ env.ARTIFACT }} |