From a27ee363d46d756ef4034db6adb181326e2108c2 Mon Sep 17 00:00:00 2001 From: RalfG Date: Fri, 12 Apr 2024 12:09:29 +0200 Subject: [PATCH 1/3] Fix GUI publish workflow; Add workflow dispatch trigger (uncommented sections for testing) --- .github/workflows/publish.yml | 96 +++++++++++++++++------------------ .github/workflows/test.yml | 1 + deeplc_innosetup.iss | 30 +++++------ 3 files changed, 64 insertions(+), 63 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 24f7a38..d59fa37 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,8 +2,8 @@ name: Publish to PyPI and GitHub release on: push: - tags: - - 'v*' + # tags: + # - 'v*' jobs: python-package: @@ -26,8 +26,8 @@ jobs: - name: Build package run: | python -m build . --sdist --wheel - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + # - name: Publish to PyPI + # uses: pypa/gh-action-pypi-publish@release/v1 - name: Upload compiled wheels uses: actions/upload-artifact@v4 with: @@ -55,54 +55,54 @@ jobs: - name: Test built DeepLC exe run: dist/deeplc/deeplc.exe --ignore-gooey --help - name: Run Inno Setup - run: ISCC.exe ./deeplc_innosetup.iss /DMyAppVersion=$(python setup.py --version) + 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/* + # 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 + # 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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 88dee15..78dae12 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,6 +5,7 @@ on: branches: - master pull_request: + workflow_dispatch: jobs: test: diff --git a/deeplc_innosetup.iss b/deeplc_innosetup.iss index 9efbf8a..09316f7 100644 --- a/deeplc_innosetup.iss +++ b/deeplc_innosetup.iss @@ -1,23 +1,23 @@ -#define MyAppName "DeepLC" -#define MyAppPublisher "CompOmics" -#define MyAppURL "https://github.com/compomics/DeepLC" -#define MyAppExeName "deeplc.exe" +#define AppName "DeepLC" +#define AppPublisher "CompOmics" +#define AppURL "https://github.com/compomics/DeepLC" +#define AppExeName "deeplc.exe" [Setup] AppId={{5540C6D9-E2DE-42EC-90A7-8598F55EA165} -AppName={#MyAppName} -AppVersion={#MyAppVersion} -AppPublisher={#MyAppPublisher} -AppPublisherURL={#MyAppURL} -AppSupportURL={#MyAppURL} -AppUpdatesURL={#MyAppURL} -DefaultDirName={autopf}\{#MyAppName} +AppName={#AppName} +AppVersion={#AppVersion} +AppPublisher={#AppPublisher} +AppPublisherURL={#AppURL} +AppSupportURL={#AppURL} +AppUpdatesURL={#AppURL} +DefaultDirName={autopf}\{#AppName} DisableProgramGroupPage=yes LicenseFile=.\LICENSE PrivilegesRequired=lowest PrivilegesRequiredOverridesAllowed=dialog OutputDir="dist" -OutputBaseFilename="{#MyAppName}-{#MyAppVersion}-Windows64bit" +OutputBaseFilename="{#AppName}-{#AppVersion}-Windows64bit" Compression=lzma SolidCompression=yes WizardStyle=modern @@ -32,8 +32,8 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{ Source: "dist\deeplc\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs [Icons] -Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" -Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon +Name: "{autoprograms}\{#AppName}"; Filename: "{app}\{#AppExeName}" +Name: "{autodesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Tasks: desktopicon [Run] -Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent +Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(AppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent From c766edbc52a68e2f46e011b2a7e8c71b6a3253d7 Mon Sep 17 00:00:00 2001 From: RalfG Date: Fri, 12 Apr 2024 17:41:54 +0200 Subject: [PATCH 2/3] Use unique names for artefacts --- .github/workflows/publish.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d59fa37..cc95bef 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -31,7 +31,7 @@ jobs: - name: Upload compiled wheels uses: actions/upload-artifact@v4 with: - name: dist + name: python-wheels path: dist/*.whl windows-installer: @@ -59,7 +59,7 @@ jobs: - name: Upload installer uses: actions/upload-artifact@v4 with: - name: dist + name: windows-installer path: dist/*.exe # git-release: @@ -69,7 +69,6 @@ jobs: # - name: Download installer # uses: actions/download-artifact@v4 # with: - # name: dist # path: dist # - name: Create GitHub Release # uses: docker://antonyurchenko/git-release:v4 From c717e6142ac4e682853fe60a5e24ee2bb048f8e4 Mon Sep 17 00:00:00 2001 From: RalfG Date: Fri, 12 Apr 2024 18:53:32 +0200 Subject: [PATCH 3/3] Uncomment steps that were disabled for testing --- .github/workflows/publish.yml | 92 +++++++++++++++++------------------ 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cc95bef..01bdda3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,8 +2,8 @@ name: Publish to PyPI and GitHub release on: push: - # tags: - # - 'v*' + tags: + - 'v*' jobs: python-package: @@ -26,8 +26,8 @@ jobs: - name: Build package run: | python -m build . --sdist --wheel - # - name: Publish to PyPI - # uses: pypa/gh-action-pypi-publish@release/v1 + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 - name: Upload compiled wheels uses: actions/upload-artifact@v4 with: @@ -62,46 +62,46 @@ jobs: name: windows-installer path: dist/*.exe - # git-release: - # runs-on: ubuntu-latest - # needs: [python-package, windows-installer] - # steps: - # - name: Download installer - # uses: actions/download-artifact@v4 - # with: - # 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/* + git-release: + runs-on: ubuntu-latest + needs: [python-package, windows-installer] + steps: + - name: Download installer + uses: actions/download-artifact@v4 + with: + 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 + 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