Skip to content

Commit

Permalink
Add publish to PyPI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
brofi committed May 4, 2024
1 parent d04e466 commit 3d13a44
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish release

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/coh2-live-stats
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: create virtual environment
run: |
python -m venv --without-pip .venv
python -m venv --upgrade-deps --upgrade .venv
- name: activate virtual environment
run: python -c "from scripts.github_actions.activate import run; run()"
- name: install dependencies
run: python -m pip install build twine
- name: build package
run: python -m build
- name: check package
run: python -m twine check dist/*
- name: publish package
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 3d13a44

Please sign in to comment.