Skip to content

Commit

Permalink
Merge pull request #12 from rheinwerk-verlag/improvement/trusted-publ…
Browse files Browse the repository at this point in the history
…isher-management-workflow

Add Trusted Publisher Management workflow
  • Loading branch information
W1ldPo1nter authored Mar 15, 2024
2 parents b94d6ee + 7b3f4dc commit 7ffb690
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
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

0 comments on commit 7ffb690

Please sign in to comment.