Skip to content

Commit

Permalink
Add upload release step
Browse files Browse the repository at this point in the history
  • Loading branch information
tarekmulla committed Sep 3, 2023
1 parent d10d7b7 commit d8195f0
Showing 1 changed file with 32 additions and 3 deletions.
35 changes: 32 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}}

0 comments on commit d8195f0

Please sign in to comment.