Skip to content

Commit

Permalink
Merge pull request #17 from laixintao/release-ci
Browse files Browse the repository at this point in the history
add release ci: upload to pypi on tag push.
  • Loading branch information
laixintao committed Sep 29, 2023
2 parents 9fa2ac3 + 23ea07d commit 7e4792c
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release

on:
push:
tags:
- v*

jobs:
release-pypi:
name: release-pypi
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- name: Install Dependencies
run: |
python3 -m venv venv
. venv/bin/activate
pip install -U pip
pip install poetry
poetry install
python -c "import sys; print(sys.version)"
pip list
- name: Poetry Build
run: |
. venv/bin/activate
poetry build
- name: Test Build
run: |
python3 -m venv fresh_env
. fresh_env/bin/activate
pip install dist/*.whl
flameshow --version
- name: Upload to Pypi
env:
PASSWORD: ${{ secrets.FLAMESHOW_PYPI_TOKEN }}
run: |
. venv/bin/activate
poetry publish --username __token__ --password ${PASSWORD}
2 changes: 0 additions & 2 deletions pytest.ini

This file was deleted.

0 comments on commit 7e4792c

Please sign in to comment.