Improve workflow
This commit is contained in:
parent
9b04535f24
commit
1898bec5bb
3 changed files with 63 additions and 25 deletions
38
.github/workflows/build_all.yaml
vendored
Normal file
38
.github/workflows/build_all.yaml
vendored
Normal file
|
@ -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
|
24
.github/workflows/build_macos.yaml
vendored
24
.github/workflows/build_macos.yaml
vendored
|
@ -34,9 +34,9 @@ jobs:
|
||||||
- name: Build with PyInstaller
|
- name: Build with PyInstaller
|
||||||
run: |
|
run: |
|
||||||
pyinstaller BTClockOTA-universal.spec
|
pyinstaller BTClockOTA-universal.spec
|
||||||
- name: Get current block
|
# - name: Get current block
|
||||||
id: getBlockHeight
|
# id: getBlockHeight
|
||||||
run: echo "blockHeight=$(curl -s https://mempool.space/api/blocks/tip/height)" >> $GITHUB_OUTPUT
|
# run: echo "blockHeight=$(curl -s https://mempool.space/api/blocks/tip/height)" >> $GITHUB_OUTPUT
|
||||||
- name: Zip the app bundle
|
- name: Zip the app bundle
|
||||||
run: |
|
run: |
|
||||||
cd dist
|
cd dist
|
||||||
|
@ -54,12 +54,12 @@ jobs:
|
||||||
path: |
|
path: |
|
||||||
dist/*
|
dist/*
|
||||||
!dist/BTClockOTA.app
|
!dist/BTClockOTA.app
|
||||||
- name: Create release
|
# - name: Create release
|
||||||
uses: ncipollo/release-action@v1
|
# uses: ncipollo/release-action@v1
|
||||||
with:
|
# with:
|
||||||
tag: ${{ steps.getBlockHeight.outputs.blockHeight }}
|
# tag: ${{ steps.getBlockHeight.outputs.blockHeight }}
|
||||||
commit: main
|
# commit: main
|
||||||
name: release-${{ steps.getBlockHeight.outputs.blockHeight }}
|
# name: release-${{ steps.getBlockHeight.outputs.blockHeight }}
|
||||||
artifacts: "dist/*.dmg,dist/*.zip"
|
# artifacts: "dist/*.dmg,dist/*.zip"
|
||||||
allowUpdates: true
|
# allowUpdates: true
|
||||||
makeLatest: true
|
# makeLatest: true
|
||||||
|
|
26
.github/workflows/build_windows.yaml
vendored
26
.github/workflows/build_windows.yaml
vendored
|
@ -34,21 +34,21 @@ jobs:
|
||||||
--volume "${{ github.workspace }}:/src/" \
|
--volume "${{ github.workspace }}:/src/" \
|
||||||
--env SPECFILE=./BTClockOTA.spec \
|
--env SPECFILE=./BTClockOTA.spec \
|
||||||
batonogov/pyinstaller-windows:latest
|
batonogov/pyinstaller-windows:latest
|
||||||
- name: Get current block
|
# - name: Get current block
|
||||||
id: getBlockHeight
|
# id: getBlockHeight
|
||||||
run: echo "blockHeight=$(curl -s https://mempool.space/api/blocks/tip/height)" >> $GITHUB_OUTPUT
|
# run: echo "blockHeight=$(curl -s https://mempool.space/api/blocks/tip/height)" >> $GITHUB_OUTPUT
|
||||||
- name: Archive artifacts
|
- name: Archive artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: windows-artifacts
|
name: windows-artifacts
|
||||||
path: dist/
|
path: dist/
|
||||||
- name: Create release
|
# - name: Create release
|
||||||
uses: ncipollo/release-action@v1
|
# uses: ncipollo/release-action@v1
|
||||||
with:
|
# with:
|
||||||
tag: ${{ steps.getBlockHeight.outputs.blockHeight }}
|
# tag: ${{ steps.getBlockHeight.outputs.blockHeight }}
|
||||||
commit: main
|
# commit: main
|
||||||
name: release-${{ steps.getBlockHeight.outputs.blockHeight }}
|
# name: release-${{ steps.getBlockHeight.outputs.blockHeight }}
|
||||||
artifacts: 'dist/**'
|
# artifacts: 'dist/**'
|
||||||
allowUpdates: true
|
# allowUpdates: true
|
||||||
removeArtifacts: true
|
# removeArtifacts: true
|
||||||
makeLatest: true
|
# makeLatest: true
|
Loading…
Reference in a new issue