Skip to content

Commit

Permalink
Fix publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
minisbett committed Mar 2, 2024
1 parent d51e64c commit 83c97f5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 26 deletions.
37 changes: 12 additions & 25 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,35 @@ name: publish

on:
push:
branches: [ "release" ]
tags:
- 'v*-release'

permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}


- name: Install Python 3.11
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: '3.11'


- name: Install build-essential
run: apt install build-essential
- name: Install Requirements
run: |
pip install -r ext/requirements.txt
pip install pyinstaller
- name: Run PyInstaller
run: make publish

- name: Create release
id: upload_url
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "$GITHUB_REF_NAME" \
--repo="$GITHUB_REPOSITORY" \
--title="${GITHUB_REPOSITORY#*/} ${GITHUB_REF_NAME#v}" \
--generate-notes
echo "::set-output name=release_id::$(gh release view "$GITHUB_REF_NAME" --json id --repo="$GITHUB_REPOSITORY" | jq -r .id)"
run: pyinstaller pyinstaller.spec

- name: Upload Artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.upload_url.outputs.url }}
asset_path: ./dist/epiclonvisualizer.exe
asset_name: epiclonvisualizer.exe
asset_content_type: application/octet-stream
run: gh release upload "${{ github.ref_name }}" dist/epiclonvisualizer.exe --repo="${GITHUB_REPOSITORY}"
1 change: 0 additions & 1 deletion pyinstaller.spec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ a = Analysis(
datas=[("templates/*", "templates"), ("static/js/*", "static/js"), ("static/css/*", "static/css")],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
Expand Down

0 comments on commit 83c97f5

Please sign in to comment.