Skip to content

Commit ed74d9d

Browse files
authored
Use Trusted Publishers for publishing on PyPI (#253)
* Use Trusted Publishers for publishing on PyPI * Revert "Release v0.5.1 - Changelog" This reverts commit 68a83eb.
1 parent 68a83eb commit ed74d9d

3 files changed

Lines changed: 32 additions & 41 deletions

File tree

.github/workflows/cd_release.yml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- published
77

88
jobs:
9-
publish-package-and-docs:
9+
build:
1010
name: External
1111
uses: SINTEF/ci-cd/.github/workflows/cd_release.yml@v2.8.2
1212
if: github.repository == 'SINTEF/oteapi-optimade' && startsWith(github.ref, 'refs/tags/v')
@@ -21,8 +21,11 @@ jobs:
2121
release_branch: main
2222
install_extras: "[dev]"
2323
python_version_build: "3.9"
24-
build_cmd: "pip install -U flit && flit build"
25-
publish_on_pypi: true
24+
build_libs: flit
25+
build_cmd: "flit build"
26+
build_dir: "dist"
27+
publish_on_pypi: false
28+
upload_distribution: true
2629

2730
# Documentation
2831
update_docs: true
@@ -31,5 +34,29 @@ jobs:
3134
changelog_exclude_labels: "skip_changelog,duplicate,question,invalid,wontfix"
3235

3336
secrets:
34-
PyPI_token: ${{ secrets.PYPI_TOKEN }}
3537
PAT: ${{ secrets.RELEASE_PAT }}
38+
39+
publish:
40+
name: Publish to PyPI
41+
needs: build
42+
runs-on: ubuntu-latest
43+
44+
# Using environments is recommended by PyPI when using Trusted Publishers
45+
environment:
46+
name: pypi
47+
url: https://pypi.org/project/oteapi-optimade
48+
49+
# The id-token:write permission is required by the PyPI upload action for
50+
# Trusted Publishers
51+
permissions:
52+
id-token: write
53+
54+
steps:
55+
- name: Download distribution
56+
uses: actions/download-artifact@v4
57+
with:
58+
name: dist # The artifact will always be called 'dist'
59+
path: dist
60+
61+
- name: Publish to PyPI
62+
uses: pypa/gh-action-pypi-publish@release/v1

CHANGELOG.md

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,5 @@
11
# Changelog
22

3-
## [Unreleased](https://github.com/SINTEF/oteapi-optimade/tree/HEAD)
4-
5-
[Full Changelog](https://github.com/SINTEF/oteapi-optimade/compare/v0.5.1...HEAD)
6-
7-
## Update to latest dependencies
8-
9-
Update dependencies to support the latest core libraries.
10-
11-
This release is done almost immediately prior to the v0.6.0.dev0 release, which will support the upcoming re-design of OTEAPI Core and the use of sessions.
12-
13-
## [v0.5.1](https://github.com/SINTEF/oteapi-optimade/tree/v0.5.1) (2024-09-02)
14-
15-
[Full Changelog](https://github.com/SINTEF/oteapi-optimade/compare/v0.5.0...v0.5.1)
16-
17-
## Update to latest dependencies
18-
19-
Update dependencies to support the latest core libraries.
20-
21-
This release is done almost immediately prior to the v0.6.0.dev0 release, which will support the upcoming re-design of OTEAPI Core and the use of sessions.
22-
23-
**Merged pull requests:**
24-
25-
- \[pre-commit.ci\] pre-commit autoupdate [\#248](https://github.com/SINTEF/oteapi-optimade/pull/248) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
26-
- \[pre-commit.ci\] pre-commit autoupdate [\#245](https://github.com/SINTEF/oteapi-optimade/pull/245) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
27-
- \[pre-commit.ci\] pre-commit autoupdate [\#244](https://github.com/SINTEF/oteapi-optimade/pull/244) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
28-
- \[pre-commit.ci\] pre-commit autoupdate [\#243](https://github.com/SINTEF/oteapi-optimade/pull/243) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
29-
- \[pre-commit.ci\] pre-commit autoupdate [\#240](https://github.com/SINTEF/oteapi-optimade/pull/240) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
30-
- \[pre-commit.ci\] pre-commit autoupdate [\#237](https://github.com/SINTEF/oteapi-optimade/pull/237) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
31-
- \[pre-commit.ci\] pre-commit autoupdate [\#235](https://github.com/SINTEF/oteapi-optimade/pull/235) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
32-
- \[pre-commit.ci\] pre-commit autoupdate [\#232](https://github.com/SINTEF/oteapi-optimade/pull/232) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
33-
- \[pre-commit.ci\] pre-commit autoupdate [\#231](https://github.com/SINTEF/oteapi-optimade/pull/231) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
34-
- \[pre-commit.ci\] pre-commit autoupdate [\#229](https://github.com/SINTEF/oteapi-optimade/pull/229) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
35-
- \[pre-commit.ci\] pre-commit autoupdate [\#227](https://github.com/SINTEF/oteapi-optimade/pull/227) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
36-
- \[pre-commit.ci\] pre-commit autoupdate [\#226](https://github.com/SINTEF/oteapi-optimade/pull/226) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
37-
- \[pre-commit.ci\] pre-commit autoupdate [\#223](https://github.com/SINTEF/oteapi-optimade/pull/223) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
38-
393
## [v0.5.0](https://github.com/SINTEF/oteapi-optimade/tree/v0.5.0) (2024-03-07)
404

415
[Full Changelog](https://github.com/SINTEF/oteapi-optimade/compare/v0.4.2...v0.5.0)

oteapi_optimade/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import logging
1212

13-
__version__ = "0.5.1"
13+
__version__ = "0.5.0"
1414
__author__ = "Casper Welzel Andersen"
1515
__author_email__ = "casper.w.andersen@sintef.no"
1616

0 commit comments

Comments
 (0)