Skip to content

Fix GUI publish workflow; Add workflow dispatch trigger (uncommented … #177

Fix GUI publish workflow; Add workflow dispatch trigger (uncommented …

Fix GUI publish workflow; Add workflow dispatch trigger (uncommented … #177

Workflow file for this run

name: Publish to PyPI and GitHub release
on:
push:
# tags:
# - 'v*'
jobs:
python-package:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build flake8
- name: Check for syntax errors
run: |
flake8 ./deeplc --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Build package
run: |
python -m build . --sdist --wheel
# - name: Publish to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
- name: Upload compiled wheels
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*.whl
windows-installer:
runs-on: windows-latest
needs: python-package
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[gui] pyinstaller
- name: Install Inno Setup
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install innosetup -y --allow-unofficial --force
- name: Run pyinstaller
run: pyinstaller ./deeplc_pyinstaller.spec --clean --noconfirm
- name: Test built DeepLC exe
run: dist/deeplc/deeplc.exe --ignore-gooey --help
- name: Run Inno Setup
run: ISCC.exe ./deeplc_innosetup.iss /DAppVersion=${{ github.ref_name }}
- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*.exe
# git-release:
# runs-on: ubuntu-latest
# needs: [python-package, windows-installer]
# steps:
# - name: Download installer
# uses: actions/download-artifact@v4
# with:
# name: dist
# path: dist
# - name: Create GitHub Release
# uses: docker://antonyurchenko/git-release:v4
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# DRAFT_RELEASE: "false"
# PRE_RELEASE: "false"
# CHANGELOG_FILE: "CHANGELOG.md"
# with:
# args: |
# dist/*
# build-streamlit-image:
# runs-on: ubuntu-latest
# needs: python-package
# steps:
# - uses: actions/checkout@v4
# - id: latest_release
# uses: pozetroninc/github-action-get-latest-release@master
# with:
# owner: compomics
# repo: DeepLC
# - name: Login to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Build and push to ghcr.io
# uses: docker/build-push-action@v5
# with:
# context: streamlit
# push: true
# tags: |
# ghcr.io/compomics/deeplc-streamlit:${{ steps.latest_release.outputs.release }}
# ghcr.io/compomics/deeplc-streamlit:latest