From ed80b90d7c9de78cc80b9415d2e1fd82251d5f54 Mon Sep 17 00:00:00 2001 From: SavageCore Date: Wed, 13 Sep 2023 22:08:31 +0100 Subject: [PATCH] Auto release? --- .github/workflows/release.yml | 56 ++++++++++------------------------- 1 file changed, 16 insertions(+), 40 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cadd606..65145e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,27 +6,8 @@ on: - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 jobs: - createrelease: - name: Create Release - runs-on: [ubuntu-latest] - steps: - - name: Create Release - uses: softprops/action-gh-release@v1 - with: - draft: true - generate_release_notes: true - prerelease: false - - name: Output Release URL File - run: echo "${{ steps.createrelease.outputs.upload_url }}" > release_url.txt - - name: Save Release URL File for publish - uses: actions/upload-artifact@v3 - with: - name: release_url - path: release_url.txt - build: name: Build packages - needs: createrelease runs-on: ${{ matrix.os }} strategy: matrix: @@ -37,12 +18,12 @@ jobs: pyinstaller -F -w -n torf-gui torfGUI/gui.py && cd dist/ && zip -r9 torf-gui torf-gui.app/ - OUT_FILE_NAME: torf-gui.zip + OUT_FILE_NAME: torf-gui-macOS.zip ASSET_MIME: application/zip - os: windows-latest TARGET: windows CMD_BUILD: pyinstaller -F -w -n torf-gui torfGUI/gui.py - OUT_FILE_NAME: torf-gui.exe + OUT_FILE_NAME: torf-gui-win64.exe ASSET_MIME: application/vnd.microsoft.portable-executable steps: - uses: actions/checkout@v4 @@ -56,26 +37,21 @@ jobs: pip install -r requirements.txt - name: Build with pyinstaller for ${{matrix.TARGET}} run: ${{matrix.CMD_BUILD}} - - name: Load Release URL File from release job - uses: actions/download-artifact@v3 - with: - name: release_url - - name: Get Release File Name & Upload URL - id: get_release_info - shell: bash - run: | - value=`cat release_url/release_url.txt` - echo ::set-output name=upload_url::$value - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + createrelease: + name: Create Release + needs: build + runs-on: [ubuntu-latest] + steps: + - name: Create Release + uses: softprops/action-gh-release@v1 with: - upload_url: ${{ steps.get_release_info.outputs.upload_url }} - asset_path: ./dist/${{ matrix.OUT_FILE_NAME}} - asset_name: ${{ matrix.OUT_FILE_NAME}} - asset_content_type: ${{ matrix.ASSET_MIME}} + draft: true + generate_release_notes: true + prerelease: false + files: | + dist/torf-gui-macOS.zip + dist/torf-gui-win64.exe permissions: contents: write \ No newline at end of file