Skip to content

Commit

Permalink
updated gh action with deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
TeunHuijben committed Jan 10, 2025
1 parent 1d41946 commit cdabb7b
Showing 1 changed file with 32 additions and 3 deletions.
35 changes: 32 additions & 3 deletions .github/workflows/python-lint-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
name: Python tests
name: Python tests + deploy
on:
push:
branches:
- main
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches:
- main

jobs:
build:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -40,4 +44,29 @@ jobs:
env:
PLATFORM: ubuntu-latest
BACKEND: pyqt5


deploy:
# this will run when you have tagged a commit, starting with "v*"
# and requires that you have put your twine API key in your
# github secrets (see readme for details)
needs: [test]
runs-on: ubuntu-latest
if: contains(github.ref, 'tags')
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U wheel twine build
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
run: |
git tag
python -m build .
twine upload dist/*

0 comments on commit cdabb7b

Please sign in to comment.