Skip to content

Commit

Permalink
Merge pull request #86 from kitsuyui/refine-ci
Browse files Browse the repository at this point in the history
refine ci
  • Loading branch information
kitsuyui authored Sep 6, 2023
2 parents 0a7599d + 48b8e7b commit d41d99e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: Packaging

on:
push:
pull_request:
types: [opened, synchronize]
release:
# "released" events are emitted either when directly be released or be edited from pre-released.
types: [prereleased, released]

env:
python_version: 3.11

jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -17,7 +20,7 @@ jobs:
id: setup-python
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: ${{ env.python_version }}

- name: Set up poetry
uses: abatilo/actions-poetry@v2
Expand All @@ -26,10 +29,10 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-build-${{ matrix.python }}-${{ hashFiles('**/poetry.lock') }}
key: ${{ runner.os }}-build-${{ env.python_version }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ matrix.python }}-${{ hashFiles('**/poetry.lock') }}
${{ runner.os }}-build-${{ matrix.python }}-
${{ runner.os }}-build-${{ env.python_version }}-${{ hashFiles('**/poetry.lock') }}
${{ runner.os }}-build-${{ env.python_version }}-
${{ runner.os }}-
- run: poetry install
Expand All @@ -44,7 +47,7 @@ jobs:
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/

- name: Publish distribution to PyPI
if: github.event_name == 'release' && !github.event.release.prerelease
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Test
on:
- push
- pull_request

jobs:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Spellcheck
on:
- push
- pull_request
permissions:
contents: read
Expand Down

0 comments on commit d41d99e

Please sign in to comment.