diff --git a/.github/workflows/pyinstaller_windows.yml b/.github/workflows/pyinstaller_windows.yml index cc5d153..30740a2 100644 --- a/.github/workflows/pyinstaller_windows.yml +++ b/.github/workflows/pyinstaller_windows.yml @@ -4,9 +4,7 @@ on: [push] jobs: build: - runs-on: windows-latest - steps: - name: Checkout code uses: actions/checkout@v2 @@ -26,13 +24,42 @@ jobs: run: | makensis -VERSION makensis px100.nsi - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: px100 - path: dist/* - name: Upload installer artifact uses: actions/upload-artifact@v2 with: name: installer path: Install* + release: + name: Upload Release Asset + runs-on: ubuntu-latest + needs: build + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Download installer artifact + uses: actions/download-artifact@v2 + with: + name: installer + - name: List files + run: | + ls -l + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: true + prerelease: true + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: Install Battery tester PX100.exe + asset_name: Battery-Tester-PX100.exe + asset_content_type: application/exe