diff --git a/.github/workflows/build_all.yaml b/.github/workflows/build_all.yaml new file mode 100644 index 0000000..c3ed072 --- /dev/null +++ b/.github/workflows/build_all.yaml @@ -0,0 +1,38 @@ +name: Build all artifacts and make release + +on: workflow_dispatch + +jobs: + prepare: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Get current block + id: getBlockHeight + run: echo "blockHeight=$(curl -s https://mempool.space/api/blocks/tip/height)" >> $GITHUB_OUTPUT + - name: Build Windows + uses: ./.github/workflows/build_windows + - name: Build macOS + uses: ./.github/workflows/build_macos + - name: Get Windows Artifacts + if: ${{ always() }} + uses: actions/download-artifact@v4 + with: + name: windows-artifacts + path: windows + - name: Get Job 1 Artifacts + if: ${{ always() }} + uses: actions/download-artifact@v4 + with: + name: macos-artifacts + path: macos + - name: Create release + uses: ncipollo/release-action@v1 + with: + tag: ${{ steps.getBlockHeight.outputs.blockHeight }} + commit: main + name: release-${{ steps.getBlockHeight.outputs.blockHeight }} + artifacts: "macos/**/*.dmg,macos/**/*.zip,windows/**/*.exe" + allowUpdates: true + makeLatest: true diff --git a/.github/workflows/build_macos.yaml b/.github/workflows/build_macos.yaml index 36eae18..1d07fa9 100644 --- a/.github/workflows/build_macos.yaml +++ b/.github/workflows/build_macos.yaml @@ -34,9 +34,9 @@ jobs: - name: Build with PyInstaller run: | pyinstaller BTClockOTA-universal.spec - - name: Get current block - id: getBlockHeight - run: echo "blockHeight=$(curl -s https://mempool.space/api/blocks/tip/height)" >> $GITHUB_OUTPUT + # - name: Get current block + # id: getBlockHeight + # run: echo "blockHeight=$(curl -s https://mempool.space/api/blocks/tip/height)" >> $GITHUB_OUTPUT - name: Zip the app bundle run: | cd dist @@ -54,12 +54,12 @@ jobs: path: | dist/* !dist/BTClockOTA.app - - name: Create release - uses: ncipollo/release-action@v1 - with: - tag: ${{ steps.getBlockHeight.outputs.blockHeight }} - commit: main - name: release-${{ steps.getBlockHeight.outputs.blockHeight }} - artifacts: "dist/*.dmg,dist/*.zip" - allowUpdates: true - makeLatest: true + # - name: Create release + # uses: ncipollo/release-action@v1 + # with: + # tag: ${{ steps.getBlockHeight.outputs.blockHeight }} + # commit: main + # name: release-${{ steps.getBlockHeight.outputs.blockHeight }} + # artifacts: "dist/*.dmg,dist/*.zip" + # allowUpdates: true + # makeLatest: true diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index cfbdaeb..94899de 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -34,21 +34,21 @@ jobs: --volume "${{ github.workspace }}:/src/" \ --env SPECFILE=./BTClockOTA.spec \ batonogov/pyinstaller-windows:latest - - name: Get current block - id: getBlockHeight - run: echo "blockHeight=$(curl -s https://mempool.space/api/blocks/tip/height)" >> $GITHUB_OUTPUT + # - name: Get current block + # id: getBlockHeight + # run: echo "blockHeight=$(curl -s https://mempool.space/api/blocks/tip/height)" >> $GITHUB_OUTPUT - name: Archive artifacts uses: actions/upload-artifact@v4 with: name: windows-artifacts path: dist/ - - name: Create release - uses: ncipollo/release-action@v1 - with: - tag: ${{ steps.getBlockHeight.outputs.blockHeight }} - commit: main - name: release-${{ steps.getBlockHeight.outputs.blockHeight }} - artifacts: 'dist/**' - allowUpdates: true - removeArtifacts: true - makeLatest: true \ No newline at end of file + # - name: Create release + # uses: ncipollo/release-action@v1 + # with: + # tag: ${{ steps.getBlockHeight.outputs.blockHeight }} + # commit: main + # name: release-${{ steps.getBlockHeight.outputs.blockHeight }} + # artifacts: 'dist/**' + # allowUpdates: true + # removeArtifacts: true + # makeLatest: true \ No newline at end of file