Skip to content

Commit

Permalink
refactor workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zaro0508 committed Jan 18, 2024
1 parent 5abb2eb commit 91d473c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: main

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+([0-9]+)'

jobs:
pypi-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install --no-interaction --all-extras
- name: Publish to pypi
run: poetry publish --build -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}
15 changes: 1 addition & 14 deletions .github/workflows/main.yaml → .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: main
name: tests

on:
push:
branches:
- '*'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+([0-9]+)'
pull_request:
branches:
- '*'
Expand Down Expand Up @@ -53,14 +51,3 @@ jobs:
run: poetry run tox -e py
- name: run python test report
run: poetry run tox -e report
pypi-release:
if: ${{ github.ref_type == 'tag' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install --no-interaction --all-extras
- name: Publish to pypi
run: poetry publish --build -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 91d473c

Please # to comment.