Skip to content

Commit

Permalink
fix: cicd yaml typo
Browse files Browse the repository at this point in the history
  • Loading branch information
duttonw committed Oct 16, 2024
1 parent 140ee9e commit 448d0d3
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ on:
options:
- No
- Yes
environment:
description: 'Deployment environment'
required: true
default: 'pypi'
type: choice
options:
- pypi
- testpypi
dryRun:
description: 'Dry Run deployment (set to false to deploy)'
required: true
type: boolean
default: true
environment:
description: 'Deployment environment'
required: true
default: 'pypi'
type: choice
options:
- pypi
- testpypi
dryRun:
description: 'Dry Run deployment (set to false to deploy)'
required: true
type: boolean
default: true



Expand Down Expand Up @@ -97,15 +97,16 @@ jobs:
needs: test
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
name: Publish ${{ steps.version.outputs.repo_name }} @ ${{ steps.version.outputs.version }} to ${{ steps.version.outputs.url }}
name: Publish Package
runs-on: ubuntu-latest
environment:
name: ${{ github.event.inputs.environment }}
url: ${{ steps.version.outputs.url }}
concurrency:
group: ${{ github.event.inputs.environment }}-deployment
cancel-in-progress: false
steps:

steps:
- name: Get Git Tag and set url from environment
id: version
run: |
Expand All @@ -116,13 +117,13 @@ jobs:
echo "version=${TAG_VALUE}" >> $GITHUB_ENV
# Extract the repository name (minus the owner/org)
repo_name=$(basename $GITHUB_REPOSITORY)
echo "repo_name=${repo_name}" >> $GITHUB_OUTPUT
reponame=$(basename $GITHUB_REPOSITORY)
echo "reponame=${reponame}" >> $GITHUB_OUTPUT
if [ "$ENVIRONMENT" == "pypi" ]; then
url="https://pypi.com/p/$repo_name"
url="https://pypi.com/p/$reponame"
elif [ "$1" == "testpypi" ]; then
url="https://test.pypi.com/p/$repo_name"
url="https://test.pypi.com/p/$reponame"
else
url=""
fi
Expand All @@ -131,7 +132,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build package ${{ steps.version.outputs.repo_name }} @ ${{ steps.version.outputs.version }}
- name: Build package ${{ steps.version.outputs.reponame }} @ ${{ steps.version.outputs.version }}
run: |
pip install build
pip install twine
Expand Down

0 comments on commit 448d0d3

Please sign in to comment.