diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8584b86 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +# runs on releases (prereleased or released) +# publishes package to test.pypi.org or actual +--- +name: Release + +on: + release: + types: + - prereleased + - released + +jobs: + release: + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - uses: hmarr/debug-action@v2 + + - uses: actions/checkout@v2 + + - name: Build and Publish (Prerelease) + if: "github.event.release.prerelease" + uses: JRubics/poetry-publish@v1.9 + with: + pypi_token: ${{ secrets.PYPI_TEST_TOKEN }} + build_format: "sdist" + repository_name: "testpypi" + repository_url: "https://test.pypi.org/legacy/" + + - name: Build and Publish (Release) + if: "!github.event.release.prerelease" + uses: JRubics/poetry-publish@v1.9 + with: + pypi_token: ${{ secrets.PYPI_TOKEN }} + build_format: "sdist" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cf210a2..e16dea7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,5 @@ -# -# Copyright (C) 2021 Tuono, Inc. -# All Rights Reserved -# +# runs on pull requests and merges into main +# runs lint and coverage and uploads to codecov --- name: Test