From ff9b1aa3b1b30f1848452ea254b07a81091c3c5a Mon Sep 17 00:00:00 2001 From: "James E. King III" Date: Thu, 30 Dec 2021 14:46:10 -0500 Subject: [PATCH] add release workflow --- .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 6 ++---- 2 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/release.yml 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