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

Add Trusted Publisher Management workflow #12

Merged
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
20 changes: 11 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,21 @@ on:

jobs:
publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment: production
environment:
name: production
url: https://pypi.org/project/planning-poker/
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '12'
- name: Install dependencies
Expand All @@ -28,8 +33,5 @@ jobs:
run: |
django-admin compilemessages
python setup.py sdist bdist_wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1.4
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
14 changes: 8 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
python-version: [3.8, 3.9]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -31,28 +31,30 @@ jobs:
run: coverage xml
if: ${{ success() }}
- name: Upload coverage report
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v4
with:
files: coverage.xml
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}
if: ${{ success() }}

js-tests:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '12'
- name: Install dependencies
run: npm install
- name: Run tests
run: npm run test:coverage
- name: Upload coverage report
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v4
with:
files: ./coverage/cobertura-coverage.xml
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}
if: ${{ success() }}
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Changelog
Development
-----------

* Changed publish workflow to match the Trusted Publisher Management in PyPI
* Updated Django requirement

1.0.3 (2022-09-01)
Expand Down