From 52c3a877e2a402506440ca67ce8cf911e32283d0 Mon Sep 17 00:00:00 2001 From: cnotbohm Date: Wed, 4 Mar 2026 22:43:46 +0000 Subject: [PATCH 1/2] fix publish action --- .github/workflows/publish.yml | 74 ++++------------------------------- 1 file changed, 8 insertions(+), 66 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9887549..768a63b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,32 +1,19 @@ -name: Client Build, Publish, and Release +name: Client Build and Publish on: workflow_dispatch: - inputs: - tag: - description: "Release tag (for example: 1.1.1)" - required: true - type: string - release_name: - description: "Release name (defaults to tag if empty)" - required: false - default: "" - type: string - prerelease: - description: "Mark as prerelease" - required: true - default: false - type: boolean jobs: - build: - name: Build package distributions + pypi-publish: + name: Upload release to PyPI runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/django-livefield permissions: - contents: read + id-token: write steps: - - name: Checkout code - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: @@ -40,50 +27,5 @@ jobs: - name: Build package run: | make build - - name: Upload dist artifacts - uses: actions/upload-artifact@v4 - with: - name: python-dist - path: dist/* - if-no-files-found: error - - pypi-publish: - name: Upload release to public PyPI - runs-on: ubuntu-latest - needs: build - environment: - name: pypi - url: https://pypi.org/p/django-livefield - permissions: - id-token: write - steps: - - name: Download dist artifacts - uses: actions/download-artifact@v4 - with: - name: python-dist - path: dist - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - - create-github-release: - name: Create GitHub release - runs-on: ubuntu-latest - needs: - - pypi-publish - permissions: - contents: write - steps: - - name: Download dist artifacts - uses: actions/download-artifact@v4 - with: - name: python-dist - path: dist - - name: Create release - uses: softprops/action-gh-release@v2 - with: - tag_name: ${{ inputs.tag }} - name: ${{ inputs.release_name || inputs.tag }} - target_commitish: ${{ github.sha }} - prerelease: ${{ inputs.prerelease }} - generate_release_notes: true - files: dist/* From c7c48cade403734a0c5779ab034d66eea235b866 Mon Sep 17 00:00:00 2001 From: cnotbohm Date: Wed, 4 Mar 2026 22:49:42 +0000 Subject: [PATCH 2/2] address comment --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 768a63b..20d23f6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,6 +11,7 @@ jobs: name: pypi url: https://pypi.org/p/django-livefield permissions: + contents: read id-token: write steps: - uses: actions/checkout@v4