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

fix: publish with oidc #29

Merged
merged 1 commit into from
Dec 27, 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
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aiocloudweather",
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bookworm",
"image": "mcr.microsoft.com/devcontainers/python:1-3.13-bookworm",
"postCreateCommand": "pip3 install -e .",
"runArgs": [
"-e",
Expand Down
31 changes: 21 additions & 10 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ on:
types: [published]

jobs:
deploy:

build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand All @@ -20,13 +18,26 @@ jobs:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
python -m pip install --upgrade pip build
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
PACKAGE_VERSION: ${{ github.event.release.name }}
PACKAGE_VERSION: ${{ github.event.release.tag_name }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
python -m build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/

publish:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@67339c736fd9354cd4f8cb0b744f2b82a74b5c70
Loading