Skip to content

Commit

Permalink
Create a matrix publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
dormant-user committed Oct 4, 2024
1 parent 4c319ac commit 336f969
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/matrix-publisher.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
on:
workflow_dispatch:
inputs:
dry_run:
description: "Dry run?"
type: choice
options:
- "true"
- "false"

jobs:
publisher:
runs-on: thevickypedia-lite
strategy:
fail-fast: false
matrix:
project_names:
- jarvis-bot
- jarvis-nlp

steps:
- name: Set dry-run
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "::notice title=DryRun::Setting dry run to ${{ inputs.dry_run }} for '${{ github.event_name }}' event"
echo "dry_run=${{ inputs.dry_run }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "push" ]]; then
echo "::notice title=DryRun::Setting dry run to true for '${{ github.event_name }}' event"
echo "dry_run=true" >> $GITHUB_ENV
else
echo "::notice title=DryRun::Setting dry run to false for '${{ github.event_name }}' event"
echo "dry_run=false" >> $GITHUB_ENV
fi
- uses: thevickypedia/pypi-publisher@v3
with:
dry-run: ${{ env.dry_run }}
token: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 336f969

Please sign in to comment.