This commit is contained in:
Djuri Baars 2024-06-10 00:14:50 +02:00
parent 11b4ea3b44
commit 9b04535f24

View file

@ -37,23 +37,29 @@ jobs:
- 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
run: |
cd dist
zip -r BTClockOTA-macos-universal2.zip BTClockOTA.app
- name: Create DMG - name: Create DMG
run: | run: |
mkdir dmg_temp mkdir dmg_temp
cp -R dist/BTClockOTA.app dmg_temp/ cp -R dist/BTClockOTA.app dmg_temp/
# Create the DMG file # Create the DMG file
hdiutil create -volname "BTClockOTA" -srcfolder dmg_temp -ov -format UDZO "dist/BTClockOTA.dmg" hdiutil create -volname "BTClockOTA" -srcfolder dmg_temp -ov -format UDZO "dist/BTClockOTA-universal.dmg"
- name: Archive artifacts - name: Archive artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: macos-artifacts name: macos-artifacts
path: dist/BTClockOTA.dmg path: |
dist/*
!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" artifacts: "dist/*.dmg,dist/*.zip"
allowUpdates: true allowUpdates: true
makeLatest: true makeLatest: true