From 1e5e25caf81a68d70992b4500f4bc367a5108dd4 Mon Sep 17 00:00:00 2001 From: JulesHuisman Date: Fri, 30 Dec 2022 14:24:20 +0000 Subject: [PATCH] Added publish action --- .github/workflows/publish.yaml | 27 +++++++++++++++++++++++++++ .github/workflows/test.yaml | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..841d567 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,27 @@ +name: Publish + +on: + release: + types: [published] + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - name: Setup Python + uses: actions/setup-python@v4.3.0 + with: + python-version: 3.8 + architecture: x64 + cache: "pip" + cache-dependency-path: "poetry.lock" + + - name: Install Poetry + run: pipx install poetry + + - name: Publish package + run: poetry publish --build --skip-existing --username ${{ secrets.PYPI_USERNAME }} --password ${{ secrets.PYPI_PASSWORD }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 38a932f..617e360 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,4 +1,4 @@ -name: test +name: Test on: pull_request: