Skip to content

Commit

Permalink
Run the publish worflow automatically, use the new trusted publusher …
Browse files Browse the repository at this point in the history
…flow when publishing
  • Loading branch information
ivanhrabcak authored Jan 19, 2025
1 parent e2cb319 commit 6c0a061
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@ name: Upload Python Package

permissions:
contents: write
id-token: write

on:
workflow_dispatch:
push:
tags:
- '**'

jobs:
deploy:
runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/edupage-api

steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -42,10 +49,8 @@ jobs:
pathspec_error_handling: ignore
push: origin master

- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m build
twine upload dist/*
- name: Build
run: python -m build
- name: Publish to pypi
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 6c0a061

Please sign in to comment.