Skip to content

Commit

Permalink
ci: Allow building/releasing a specific plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ThiefMaster committed Sep 24, 2024
1 parent 0110446 commit 6525298
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 2 deletions.
26 changes: 25 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,41 @@ on:
type: boolean
default: true
description: Append version suffix
plugin-name:
description: Build specific plugin
type: choice
options:
- '' # all plugins
- citadel
- cloud_captchas
- livesync
- livesync_debug
- owncloud
- payment_manual
- payment_paypal
- payment_sixpay
- piwik
- previewer_code
- previewer_jupyter
- prometheus
- storage_s3
- themes_legacy
- ursh
- vc_dummy
- vc_zoom

permissions:
contents: read

jobs:
build:
name: Build plugins 🏗
uses: indico/indico-gh-actions/.github/workflows/build-plugins.yml@master
uses: ThiefMaster/indico-gh-actions/.github/workflows/build-plugins.yml@master
with:
scripts-repo: ThiefMaster/indico-gh-actions
directory: public
add-version-suffix: ${{ github.event_name != 'workflow_dispatch' || inputs.add-version-suffix }}
plugin: ${{ github.event_name == 'workflow_dispatch' && inputs.plugin-name }}

bundle:
name: Bundle wheels 📦
Expand Down
34 changes: 33 additions & 1 deletion .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,31 @@ on:
- '!v3.2'
- '!v3.2.*'
- '!*\+docs'
workflow_dispatch:
inputs:
plugin-name:
description: Plugin name
required: true
type: choice
options:
- '' # this is invalid for a `required` dropdown so we force a choice instead of preselecting the first one
- citadel
- cloud_captchas
- livesync
- livesync_debug
- owncloud
- payment_manual
- payment_paypal
- payment_sixpay
- piwik
- previewer_code
- previewer_jupyter
- prometheus
- storage_s3
- themes_legacy
- ursh
- vc_dummy
- vc_zoom

permissions:
contents: read
Expand All @@ -26,6 +51,7 @@ jobs:
check-version:
name: Check version
runs-on: ubuntu-22.04
if: github.event_name != 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -38,10 +64,13 @@ jobs:
build:
name: Build plugins 🏗
needs: check-version
uses: indico/indico-gh-actions/.github/workflows/build-plugins.yml@master
if: ${{ !cancelled() && !failure() }}
uses: ThiefMaster/indico-gh-actions/.github/workflows/build-plugins.yml@master
with:
scripts-repo: ThiefMaster/indico-gh-actions
directory: public
add-version-suffix: false
plugin: ${{ github.event_name == 'workflow_dispatch' && inputs.plugin-name }}

test-install:
name: Test installing plugins
Expand Down Expand Up @@ -78,6 +107,7 @@ jobs:
needs:
- build
- test-install
if: github.event_name != 'workflow_dispatch'
runs-on: ubuntu-22.04
permissions:
contents: write
Expand Down Expand Up @@ -105,6 +135,7 @@ jobs:
- build
- test-install
- create-github-release
if: ${{ !cancelled() && !failure() }}
# Wait for approval before attempting to upload to PyPI. This allows reviewing the
# files in the draft release.
environment: publish
Expand All @@ -131,6 +162,7 @@ jobs:
packages-dir: dist/
skip-existing: true
- name: Publish GitHub release 🐙
if: github.event_name != 'workflow_dispatch'
run: >-
gh release edit
--draft=false
Expand Down

0 comments on commit 6525298

Please sign in to comment.