Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
dem214 committed May 20, 2023
1 parent 0d43a4a commit 9182c05
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ on:
types: [created]

jobs:
build:
name: build the package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python and PDM
uses: pdm-project/setup-pdm@v3
with:
cache: true
- name: Build
run: |
pdm build
- uses: actions/upload-artifact@v3
with:
name: build_distribution
path: /dist/

pypi-publish:
name: publish on pypi
runs-on: ubuntu-latest
Expand All @@ -16,12 +33,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python and PDM
uses: pdm-project/setup-pdm@v3
- uses: actions/download-artifacts@v3
with:
cache: true
- name: Build
run: |
pdm build
name: build_distribution
path: /dist/

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
cache: true
- name: Install dependencies
run: |
pdm update -dG lint --no-default
pdm sync -dG lint --no-default
- name: Test
run: |
pdm run lint
Expand All @@ -39,7 +39,7 @@ jobs:
cache: true
- name: Install dependencies
run: |
pdm update -dG test --no-default
pdm sync -dG test --no-default
- name: Test
run: |
pdm run test

0 comments on commit 9182c05

Please sign in to comment.