Skip to content

Commit

Permalink
Add GH action workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
dormant-user committed Aug 10, 2024
1 parent 6b36cdb commit b1b4a92
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/python-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: pypi-publish

on:
release:
types:
- published
push:
branches:
- main
paths:
- '**/*.py'
- 'pyproject.toml'
workflow_dispatch:

jobs:
pypi-publisher:
runs-on: thevickypedia-lite
steps:
- name: Set dry-run
run: |
if [[ "${{ github.event_name }}" == "push" || "${{ github.event_name }}" == "workflow_dispatch" ]]; 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
env:
token: ${{ secrets.PYPI_TOKEN }}
with:
dry-run: ${{ env.dry_run }}

0 comments on commit b1b4a92

Please sign in to comment.