diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 69a04d4ee3f77..1c4e99bf3ff73 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,7 @@ on: push: branches: - "testchain" + workflow_dispatch: jobs: build-linux: @@ -36,9 +37,14 @@ jobs: - run: make -j4 + - name: 'Set environment variables: version number' + run: | + TESTCHAIN_VERSION=$(grep -oP "(?<=^PACKAGE_VERSION=').+(?='$)" configure) + echo "TESTCHAIN_VERSION=$TESTCHAIN_VERSION" >> "$GITHUB_ENV" + - uses: actions/upload-artifact@v4 with: - name: binaries-Linux + name: testchain-${{ env.TESTCHAIN_VERSION }}-x86_64-unknown-linux-gnu if-no-files-found: error path: | src/testchaind @@ -87,9 +93,14 @@ jobs: - run: make -j4 + - name: 'Set environment variables: version number' + run: | + TESTCHAIN_VERSION=$(grep -oP "(?<=^PACKAGE_VERSION=').+(?='$)" configure) + echo "TESTCHAIN_VERSION=$TESTCHAIN_VERSION" >> "$GITHUB_ENV" + - uses: actions/upload-artifact@v4 with: - name: binaries-Windows + name: testchain-${{ env.TESTCHAIN_VERSION }}-x86_64-w64-mingw32 if-no-files-found: error path: | src/testchaind.exe @@ -126,9 +137,14 @@ jobs: ./configure make -j4 # Limit the concurrency to prevent OOM + - name: 'Set environment variables: version number' + run: | + TESTCHAIN_VERSION=$(grep -oP "(?<=^PACKAGE_VERSION=').+(?='$)" configure) + echo "TESTCHAIN_VERSION=$TESTCHAIN_VERSION" >> "$GITHUB_ENV" + - uses: actions/upload-artifact@v4 with: - name: binaries-macOS + name: testchain-${{ env.TESTCHAIN_VERSION }}-x86_64-apple-darwin11 if-no-files-found: error path: | src/testchaind