Skip to content

Commit

Permalink
Add GH integration
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloLec committed Jun 4, 2021
1 parent c54e575 commit 9a138cc
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
45 changes: 45 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: pypi-github-sync
description: "Sync a PyPI package with Github release"
author: Pablo Lecolinet
branding:
color: green
icon: send
inputs:
github_repo:
description: GitHub repo name with format USERNAME/REPO
required: true
twine_username:
description: Your PyPI username (use your GitHub repo secrets)
required: true
twine_password:
description: Your PyPI password (use your GitHub repo secrets)
required: true

upload_repo:
description: Repo to upload to with twine, defaults to main PyPI repo
required: false
defaults: https://pypi.org/
verify_metadata:
description: Verify build metadata before publication, defaults to false
required: false
defaults: false
skip_existing:
description: Do not raise an error if version already exists on repo, defaults to false
required: false
defaults: false
verbose:
description: Verbose output for twine upload, defaults to false
required: false
defaults: false

runs:
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.github_repo }}
- ${{ inputs.twine_username }}
- ${{ inputs.twine_password }}
- ${{ inputs.upload_repo }}
- ${{ inputs.verify_metadata }}
- ${{ inputs.skip_existing }}
- ${{ inputs.verbose }}
8 changes: 8 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

set -o errexit -o pipefail -o nounset

GITHUB_REPO=$INPUT_GITHUB_REPO
UPLOAD_REPO=$INPUT_UPLOAD_REPO
TWINE_USERNAME=$INPUT_TWINE_USERNAME
TWINE_PASSWORD=$INPUT_TWINE_PASSWORD
VERIFY_METADATA=$INPUT_VERIFY_METADATA
SKIP_EXISTING=$INPUT_SKIP_EXISTING
VERBOSE=$INPUT_VERBOSE

REPO_NAME=$(cut -d "/" -f2 <<< ${GITHUB_REPO})

echo "---------------- CLONE REPO ----------------"
Expand Down

0 comments on commit 9a138cc

Please sign in to comment.