ota-flasher/.github/workflows/build_all.yaml

41 lines
1.2 KiB
YAML
Raw Normal View History

2024-06-09 22:56:42 +00:00
name: Build all artifacts and make release
on: workflow_dispatch
jobs:
prepare:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
2024-06-09 23:01:25 +00:00
- name: Checkout repository
uses: actions/checkout@v4
2024-06-09 22:56:42 +00:00
- name: Get current block
id: getBlockHeight
run: echo "blockHeight=$(curl -s https://mempool.space/api/blocks/tip/height)" >> $GITHUB_OUTPUT
- name: Build Windows
2024-06-09 23:00:06 +00:00
uses: ./.github/workflows/build_windows.yml
2024-06-09 22:56:42 +00:00
- name: Build macOS
2024-06-09 23:00:06 +00:00
uses: ./.github/workflows/build_macos.yml
2024-06-09 22:56:42 +00:00
- 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