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

Use Trusted Publishers on PyPI #243

Merged
merged 2 commits into from
Aug 26, 2024
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
11 changes: 7 additions & 4 deletions .github/workflows/cd_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ on:
- published

jobs:
publish-package-and-docs:
build:
name: External
uses: SINTEF/ci-cd/.github/workflows/cd_release.yml@v2.8.0
uses: SINTEF/ci-cd/.github/workflows/cd_release.yml@v2.8.2
if: github.repository == 'EMMC-ASBL/tripper' && startsWith(github.ref, 'refs/tags/v')
with:
# General
Expand All @@ -23,6 +23,7 @@ jobs:
python_version_build: "3.9"
build_libs: "flit"
build_cmd: "flit build"
build_dir: "dist"
publish_on_pypi: false
upload_distribution: true

Expand All @@ -33,22 +34,24 @@ jobs:
changelog_exclude_labels: "skip_changelog,duplicate,question,invalid,wontfix"
docs_framework: mkdocs
secrets:
#PyPI_token: ${{ secrets.PYPI_TOKEN }}
PAT: ${{ secrets.RELEASE_PAT }}

publish:
name: Publish on PyPI
needs: build
runs-on: ubuntu-latest

#environment: release
environment:
name: release
url: https://pypi.org/project/tripper/
permissions:
id-token: write

steps:
- name: Download built distritbution
uses: actions/download-artifact@v4
with:
name: dist
path: dist

- name: Publish on PyPI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_automerge_dependency_prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
update-dependencies-branch:
name: External
uses: SINTEF/ci-cd/.github/workflows/ci_automerge_prs.yml@v2.8.0
uses: SINTEF/ci-cd/.github/workflows/ci_automerge_prs.yml@v2.8.2
if: github.repository_owner == 'EMMC-ASBL' && ( ( startsWith(github.event.pull_request.head.ref, 'dependabot/') && github.actor == 'dependabot[bot]' ) || ( github.event.pull_request.head.ref == 'ci/update-pyproject' && github.actor == 'TEAM4-0' ) )
secrets:
PAT: ${{ secrets.RELEASE_PAT }}
2 changes: 1 addition & 1 deletion .github/workflows/ci_cd_updated_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
update-deps-branch-and-docs:
name: External
uses: SINTEF/ci-cd/.github/workflows/ci_cd_updated_default_branch.yml@v2.8.0
uses: SINTEF/ci-cd/.github/workflows/ci_cd_updated_default_branch.yml@v2.8.2
if: github.repository_owner == 'EMMC-ASBL'
with:
# General
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_check_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
check-dependencies:
name: External
uses: SINTEF/ci-cd/.github/workflows/ci_check_pyproject_dependencies.yml@v2.8.0
uses: SINTEF/ci-cd/.github/workflows/ci_check_pyproject_dependencies.yml@v2.8.2
if: github.repository_owner == 'EMMC-ASBL'
with:
git_username: "TEAM 4.0[bot]"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
basic-tests:
name: External
uses: SINTEF/ci-cd/.github/workflows/ci_tests.yml@v2.8.0
uses: SINTEF/ci-cd/.github/workflows/ci_tests.yml@v2.8.2
with:
## General settings:
install_extras: "[dev]"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_update_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
create-collected-pr:
name: External
uses: SINTEF/ci-cd/.github/workflows/ci_update_dependencies.yml@v2.8.0
uses: SINTEF/ci-cd/.github/workflows/ci_update_dependencies.yml@v2.8.2
if: github.repository_owner == 'EMMC-ASBL'
with:
git_username: "TEAM 4.0[bot]"
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ repos:
rev: 24.8.0
hooks:
- id: black
line-length: 79
args: [--line-length=79]

- repo: https://github.com/PyCQA/bandit
rev: 1.7.9
Expand All @@ -63,7 +63,7 @@ repos:
- "pydantic"

- repo: https://github.com/SINTEF/ci-cd
rev: v2.8.0
rev: v2.8.2
hooks:
- id: docs-api-reference
args:
Expand Down
17 changes: 17 additions & 0 deletions docs/developers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# For developers

## New release

To create a new release, it is good to have a release summary.

To add this, create a milestone that matches the new version and tag, e.g., `v1.0.8`.

Then create a new issue, adding it to the milestone and add the `release-summary` label.

For the issue description, write the actual release summary.
This will be included as part of the changelog as well as the release notes on GitHub.

Then, go to [create a new GitHub releases](https://github.com/EMMC-ASBL/tripper/releases/new) and select the tag that matches the milestone (creating a new one).
Add again the tag as the release title (optionally write something else that defines this release as a title).

Finally, press the "Publish release" button and ensure the release workflow succeeds (check [the release workflow](https://github.com/EMMC-ASBL/tripper/actions/workflows/cd_release.yml)).
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ nav:
- Backend discovery: backend_discovery.md
- ... | api_reference/**
- Known issues: known-issues.md
- For developers: developers.md
- Changelog: CHANGELOG.md
- License: LICENSE.md

Expand Down