Skip to content

Commit

Permalink
Fix Pypi's deployment by editing CI workflow to authenticate to Pypi …
Browse files Browse the repository at this point in the history
…via API token (#1203)
  • Loading branch information
Allan-CodeWorks authored Jan 30, 2024
2 parents 8adab0b + e0bb414 commit f6f6380
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ jobs:
needs: [ check-for-functional-changes ]
if: needs.check-for-functional-changes.outputs.status == 'success'
env:
PYPI_USERNAME: openfisca-bot
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
PYPI_USERNAME: __token__
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN_OPENFISCA_BOT }}
CIRCLE_TOKEN: ${{ secrets.CIRCLECI_V1_OPENFISCADOC_TOKEN }} # Personal API token created in CircleCI to grant full read and write permissions

steps:
Expand Down Expand Up @@ -213,7 +213,7 @@ jobs:
key: release-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}

- name: Upload a Python package to PyPi
run: twine upload dist/* --username $PYPI_USERNAME --password $PYPI_PASSWORD
run: twine upload dist/* --username $PYPI_USERNAME --password $PYPI_TOKEN

- name: Publish a git tag
run: "${GITHUB_WORKSPACE}/.github/publish-git-tag.sh"
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

### 41.4.2 [#1203](https://github.com/openfisca/openfisca-core/pull/1203)

#### Technical changes

- Changes the Pypi's deployment authentication way to use token API following Pypi's 2FA enforcement starting 2024/01/01.

### 41.4.1 [#1202](https://github.com/openfisca/openfisca-core/pull/1202)

#### Technical changes
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

setup(
name="OpenFisca-Core",
version="41.4.1",
version="41.4.2",
author="OpenFisca Team",
author_email="contact@openfisca.org",
classifiers=[
Expand Down

0 comments on commit f6f6380

Please sign in to comment.