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

54 lines
1.6 KiB
YAML
Raw Normal View History

2024-06-09 21:23:06 +00:00
name: Build Windows artifacts and make release
2024-06-09 17:52:06 +00:00
on: workflow_dispatch
jobs:
build-windows:
runs-on:
- ubuntu-latest
2024-06-09 18:09:23 +00:00
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
2024-06-09 12:50:38 +00:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
2024-06-09 13:25:54 +00:00
# - name: Cache pip packages
# id: pip-cache
# uses: actions/cache@v4
# with:
# path: /tmp/cachepip
# key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
# restore-keys: |
# ${{ runner.os }}-pip-
2024-06-09 12:50:38 +00:00
- name: Run Docker Container
run: |
2024-06-09 12:50:38 +00:00
docker run --rm \
2024-06-09 12:53:23 +00:00
--volume "${{ github.workspace }}:/src/" \
--env SPECFILE=./BTClockOTA-debug.spec \
2024-06-09 13:29:04 +00:00
batonogov/pyinstaller-windows:latest
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: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: windows-artifacts
path: dist/
2024-06-09 22:56:42 +00:00
# - 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