diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 87aef74..41bd794 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,14 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest] + include: + - os: macos-latest + TARGET: macos + CMD_BUILD: > + pyinstaller --noconfirm --windowed --name="HaX" --icon="hax/static/images/icon.png" --add-data="hax/config.yml:." --add-data="hax/static:static" hax/main.py && + ./scripts/bundle.sh + OUT_FILE_NAME: HaX.dmg + ASSET_MIME: application/octet-stream steps: - name: Checkout @@ -34,6 +41,28 @@ jobs: python -m pip install --upgrade pip pip install -r hax/requirements.txt pyinstaller - - name: Package the app + - name: Package ${{matrix.TARGET}} version run: | - pyinstaller --noconfirm --windowed --name="HaX" --icon="hax/static/images/icon.png" --add-data="hax/config.yml:." --add-data="hax/static:static" hax/main.py + ${{matrix.CMD_BUILD}} + + - 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: false + prerelease: false + + - 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: ./dist/${{ matrix.OUT_FILE_NAME}} + asset_name: ${{ matrix.OUT_FILE_NAME}} + asset_content_type: ${{ matrix.ASSET_MIME}}