From f57e62ae48bf9a28a6c247af8654183c3a848b5b Mon Sep 17 00:00:00 2001 From: Leon Date: Thu, 23 Mar 2023 14:24:19 +0100 Subject: [PATCH] Initial release (#2) release to pypi --- .github/workflows/prerelease.yml | 17 ++++++++++------- .github/workflows/publish.yml | 6 ++---- .github/workflows/release.yml | 12 ++++++++---- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 11a41d6..493ef9e 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -6,20 +6,23 @@ on: - "v[0-9]+.[0-9]+.[0-9]+rc[0-9]+" jobs: - build: + publish: permissions: contents: write - if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/v') # only publish on specific branches - uses: ./.github/workflows/build.yml + uses: ./.github/workflows/publish.yml + secrets: inherit # pass all secrets - publish: - name: Publish + prerelease: + name: Prerelease runs-on: ubuntu-latest - needs: build + needs: publish permissions: contents: write steps: + - name: Check out Git repository + uses: actions/checkout@v3 + - name: Download Artifact uses: actions/download-artifact@v3 with: @@ -31,5 +34,5 @@ jobs: with: files: | dist/*.whl - prerelease: False + prerelease: True body_path: CHANGELOG.md \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 752575e..8881984 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,13 +4,12 @@ on: workflow_call: push: tags: - - "v[0-9]+.[0-9]+.[0-9]+*" + - "v[0-9]+.[0-9]+.[0-9]+[ab][0-9]+" jobs: build: permissions: contents: write - if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/v') # only publish on specific branches uses: ./.github/workflows/build.yml publish: @@ -30,5 +29,4 @@ jobs: - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - password: ${{ secrets.PYPI_API_TOKEN }} - repository-url: https://test.pypi.org/legacy/ \ No newline at end of file + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c767e4..b28b163 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,24 +1,28 @@ name: Release package + on: push: tags: - "v[0-9]+.[0-9]+.[0-9]+" jobs: - build: + publish: permissions: contents: write - if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/v') # only publish on specific branches - uses: ./.github/workflows/build.yml + uses: ./.github/workflows/publish.yml + secrets: inherit # pass all secrets release: name: Release runs-on: ubuntu-latest - needs: build + needs: publish permissions: contents: write steps: + - name: Check out Git repository + uses: actions/checkout@v3 + - name: Download Artifact uses: actions/download-artifact@v3 with: