From 38c5528c67d86d281c0b16b912b5a7ae301efa4f Mon Sep 17 00:00:00 2001 From: Geoff Whittington Date: Sat, 22 Apr 2023 20:34:19 -0400 Subject: [PATCH] fix release flow --- .github/workflows/main.yml | 56 ++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 75fde73..be5cc49 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,9 +1,6 @@ name: Build Windows Executable on: - push: - branches: - - main release: types: [published] @@ -12,34 +9,35 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.x" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - pip install pyinstaller + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install pyinstaller - - name: Build executable - run: pyinstaller --name=mmrelay.exe --onefile --console main.py + - name: Build executable + run: pyinstaller --name=mmrelay.exe --onefile --console main.py - - name: Build installer - uses: nadeemjazmawe/inno-setup-action-cli@v6.0.5 - with: - filepath: './mmrelay.iss' + - name: Build installer + uses: nadeemjazmawe/inno-setup-action-cli@v6.0.5 + with: + filepath: "./mmrelay.iss" - - name: Upload setup.exe to release - uses: actions/upload-release-asset@v1 - with: - asset_path: MMRelay_setup.exe - asset_name: MMRelay_setup.exe - asset_content_type: application/octet-stream - tag_name: ${{ github.event.release.tag_name }} - release_id: ${{ github.event.release.id }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload setup.exe to release + uses: actions/upload-release-asset@v1 + with: + asset_path: MMRelay_setup.exe + asset_name: MMRelay_setup.exe + asset_content_type: application/octet-stream + tag_name: ${{ github.event.release.tag_name }} + release_id: ${{ github.event.release.id }} + upload_url: ${{ github.event.release.upload_url }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}