Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tidy scripts #69

Merged
merged 3 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/deploy_to_pypi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish the completed package to Pypi
name: Publish the completed package to PyPi

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (typo): Inconsistent capitalization of 'PyPi'

The correct capitalization is 'PyPI'. This should be corrected to maintain consistency and accuracy.

on:
workflow_call:
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
# version=$(grep 'version =' pyproject.toml | awk '{print $3}' | sed 's/"//g')
# echo "VERSION=$version" >> $GITHUB_ENV
# echo "extracted version '{{ $env.VERSION }}' from pyproject.toml"
- name: Publish package distributions to TestPyPI
- name: Publish package distributions to ${{ inputs.target-environment }}
uses: pypa/gh-action-pypi-publish@release/v1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): Potential issue with input variable naming

The input variable 'target-environment' should be checked to ensure it is correctly defined and passed. If it is not defined, this could lead to runtime errors.

with:
repository-url: ${{ vars.PYPI_URL }}
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/deploy_workflow_wrapper.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
name: build artifact and publish to pypi test
name: build artifact and publish to PyPi
on:
# whenever a PR is closed against main, or allow manual runs
# whenever version is bumped, or allow manual runs
workflow_dispatch:
inputs:
deploy_to_test:
type: boolean
description: 'Deploy to PyPi test'
required: false
default: false
workflow_run:
workflows: ["bump version"]
types:
Expand All @@ -16,15 +22,15 @@ jobs:
# package-version:
# artifact-name:

# test this here, then move to deploy_to_pypi.yml
deploy_to_pypi_test:
needs: [build_artifacts]
if: ${{ github.event.inputs.deploy_to_test == true }}
uses: ./.github/workflows/deploy_to_pypi.yml
with:
package-version: ${{ needs.build_artifacts.outputs.package-version }}
target-environment: 'pypi-test'
artifact-name: ${{ needs.build_artifacts.outputs.artifact-name }}

deploy_to_pypi_prod:
needs: [build_artifacts]
uses: ./.github/workflows/deploy_to_pypi.yml
Expand Down
Loading