Skip to content

Commit

Permalink
Modifie le job de déploiement dans la CI pour autoriser le trusted pu…
Browse files Browse the repository at this point in the history
…blishing (#204)
  • Loading branch information
Allan-CodeWorks authored Jan 16, 2024
1 parent 708b310 commit dac34ec
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/has-functional-changes.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env bash

IGNORE_DIFF_ON="README.md CONTRIBUTING.md Makefile .gitignore .github/*"
IGNORE_DIFF_ON="README.md CONTRIBUTING.md Makefile .gitignore .github/* setup.py"

last_tagged_commit=`git describe --tags --abbrev=0 --first-parent` # --first-parent ensures we don't follow tags not published in master through an unlikely intermediary merge commit

Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,11 @@ jobs:
openfisca-dependencies: [maximal]
needs: [ check-for-functional-changes ]
if: needs.check-for-functional-changes.outputs.status == 'success'
env:
PYPI_USERNAME: openfisca-bot
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
permissions:
#id-token is mandatory for trusted publishing
id-token: write
#contents is mandatory for git tag publishing
contents: write
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -156,6 +158,6 @@ jobs:
path: dist
key: release-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}-${{ matrix.openfisca-dependencies }}
- name: Upload a Python package to PyPi
run: twine upload dist/* --username $PYPI_USERNAME --password $PYPI_PASSWORD
uses: pypa/gh-action-pypi-publish@release/v1
- name: Publish a git tag
run: "${GITHUB_WORKSPACE}/.github/publish-git-tag.sh"
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
'Topic :: Scientific/Engineering :: Information Analysis',
],
description='Extension OpenFisca pour nos partenariats avec les collectivités territoriales',
long_description_content_type='text/markdown',
keywords='benefit france france-local microsimulation social tax',
license='http://www.fsf.org/licensing/licenses/agpl-3.0.html',
url='https://github.com/openfisca/openfisca-france-local',
Expand Down

0 comments on commit dac34ec

Please sign in to comment.