ota-flasher/.github/workflows/build_windows.yaml
2024-06-10 00:56:42 +02:00

54 lines
No EOL
1.6 KiB
YAML

name: Build Windows artifacts and make release
on: workflow_dispatch
jobs:
build-windows:
runs-on:
- ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- 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-
# - 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-
- name: Run Docker Container
run: |
docker run --rm \
--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: 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