From d5b541141893c03e2c54f3023688be1292527859 Mon Sep 17 00:00:00 2001 From: Jan Giacomelli Date: Tue, 22 Dec 2020 20:38:22 +0100 Subject: [PATCH] Release workflow --- .github/workflows/branch.yaml | 2 +- .github/workflows/release.yaml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/branch.yaml b/.github/workflows/branch.yaml index aa8ec63..6ec3a0f 100644 --- a/.github/workflows/branch.yaml +++ b/.github/workflows/branch.yaml @@ -1,4 +1,4 @@ -name: CI +name: Push on: [push] jobs: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..782686f --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,30 @@ +name: Release +on: + release: + types: + - created + +jobs: + publish: + strategy: + fail-fast: false + matrix: + python-version: [3.8] + poetry-version: [1.1.2] + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Run image + uses: abatilo/actions-poetry@v2.0.0 + with: + poetry-version: ${{ matrix.poetry-version }} + - name: Publish + env: + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + run: | + poetry config pypi-token.pypi $PYPI_TOKEN + poetry publish --build