From a3ad2f88025e70b25bed400a5c7c2529665c683d Mon Sep 17 00:00:00 2001 From: Cam Parry Date: Sun, 5 May 2024 20:26:10 +1000 Subject: [PATCH 1/9] ci: publish workflow breaks with name exists --- .github/workflows/publish.yaml | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 08d46c24..5a527675 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -4,10 +4,10 @@ on: release: types: [published] -# on: -# pull_request: -# branches: -# - master +on: + pull_request: + branches: + - master permissions: contents: read @@ -60,11 +60,6 @@ jobs: command: build args: --release --sdist -o dist -i 3.8 3.9 3.10 3.11 3.12 - - name: Generate artifact attestation - uses: actions/attest-build-provenance@897ed5eab6ed058a474202017ada7f40bfa52940 # v1.0.0 - with: - subject-path: 'dist/*' - - name: Upload wheels uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # 4.3.3 with: @@ -99,15 +94,10 @@ jobs: command: build args: --release -o dist - - name: Generate artifact attestation - uses: actions/attest-build-provenance@897ed5eab6ed058a474202017ada7f40bfa52940 # v1.0.0 - with: - subject-path: 'dist/*' - - name: Upload wheels uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # 4.3.3 with: - name: wheels + name: wheels-${{ matrix.python-version }} path: dist macos: @@ -140,15 +130,10 @@ jobs: command: build args: --release -o dist - - name: Generate artifact attestation - uses: actions/attest-build-provenance@897ed5eab6ed058a474202017ada7f40bfa52940 # v1.0.0 - with: - subject-path: 'dist/*' - - name: Upload wheels uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # 4.3.3 with: - name: wheels-${{ matrix.platform }} + name: wheels-${{ matrix.python-version }}-${{ matrix.platform }} path: dist python-release-github: From b9204845d90001330f393f9de058b6c32398ee2b Mon Sep 17 00:00:00 2001 From: Cam Parry Date: Sun, 5 May 2024 20:27:36 +1000 Subject: [PATCH 2/9] test publish --- .github/workflows/publish.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 5a527675..dfc2070f 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -4,7 +4,6 @@ on: release: types: [published] -on: pull_request: branches: - master From e686bf9526bd20f621a60c4e0843ebe48fc24535 Mon Sep 17 00:00:00 2001 From: Cam Parry Date: Sun, 5 May 2024 20:41:01 +1000 Subject: [PATCH 3/9] mac fixes --- .github/workflows/publish.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index dfc2070f..a93300a5 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -96,7 +96,7 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # 4.3.3 with: - name: wheels-${{ matrix.python-version }} + ame: wheels-${{ matrix.python-version }}-${{ matrix.platform }} path: dist macos: @@ -134,6 +134,7 @@ jobs: with: name: wheels-${{ matrix.python-version }}-${{ matrix.platform }} path: dist + overwrite: true python-release-github: runs-on: ubuntu-latest From 9acb424e8a0739b1612cf12c97c35546034ab521 Mon Sep 17 00:00:00 2001 From: Cam Parry Date: Sun, 5 May 2024 20:49:20 +1000 Subject: [PATCH 4/9] dist glob --- .github/workflows/publish.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index a93300a5..5baaf639 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -63,7 +63,7 @@ jobs: uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # 4.3.3 with: name: wheels-${{ matrix.platform }} - path: dist + path: dist/*.whl windows: runs-on: windows-latest @@ -96,8 +96,8 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # 4.3.3 with: - ame: wheels-${{ matrix.python-version }}-${{ matrix.platform }} - path: dist + name: wheels-${{ matrix.python-version }}-${{ matrix.platform }} + path: dist/*.whl macos: runs-on: macos-latest @@ -133,7 +133,7 @@ jobs: uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # 4.3.3 with: name: wheels-${{ matrix.python-version }}-${{ matrix.platform }} - path: dist + path: dist/*.whl overwrite: true python-release-github: From 8faaed49738b9af231824c06f39fe492cff0b1b4 Mon Sep 17 00:00:00 2001 From: Cam Parry Date: Sun, 5 May 2024 21:50:20 +1000 Subject: [PATCH 5/9] dist glob --- .github/workflows/publish.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 5baaf639..72c42ae3 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -98,6 +98,7 @@ jobs: with: name: wheels-${{ matrix.python-version }}-${{ matrix.platform }} path: dist/*.whl + overwrite: true macos: runs-on: macos-latest From 3874ff02fb8feaaa41c0ea975d0505add467bc49 Mon Sep 17 00:00:00 2001 From: Cam Parry Date: Sun, 5 May 2024 22:13:30 +1000 Subject: [PATCH 6/9] proper names --- .github/workflows/publish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 72c42ae3..c1694eac 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -96,7 +96,7 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # 4.3.3 with: - name: wheels-${{ matrix.python-version }}-${{ matrix.platform }} + name: wheels-${{ matrix.python-version }}-${{ matrix.target }} path: dist/*.whl overwrite: true From 13020fdb3e827b718aad79ee8efff37fbf9afb86 Mon Sep 17 00:00:00 2001 From: Cam Parry Date: Sun, 5 May 2024 22:22:19 +1000 Subject: [PATCH 7/9] proper names --- .github/workflows/publish.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index c1694eac..dded428d 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -98,7 +98,6 @@ jobs: with: name: wheels-${{ matrix.python-version }}-${{ matrix.target }} path: dist/*.whl - overwrite: true macos: runs-on: macos-latest @@ -133,9 +132,8 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # 4.3.3 with: - name: wheels-${{ matrix.python-version }}-${{ matrix.platform }} + name: wheels-${{ matrix.python-version }}-${{ matrix.target }} path: dist/*.whl - overwrite: true python-release-github: runs-on: ubuntu-latest From 92f1fca5d50d0fbed894d856daff36d1e2aa4936 Mon Sep 17 00:00:00 2001 From: Cam Parry Date: Sun, 5 May 2024 22:50:41 +1000 Subject: [PATCH 8/9] comment out --- .github/workflows/publish.yaml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index dded428d..d5ca6681 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -4,9 +4,9 @@ on: release: types: [published] - pull_request: - branches: - - master + # pull_request: + # branches: + # - master permissions: contents: read @@ -62,7 +62,7 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # 4.3.3 with: - name: wheels-${{ matrix.platform }} + name: wheels-linux-${{ matrix.platform }} path: dist/*.whl windows: @@ -96,7 +96,7 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # 4.3.3 with: - name: wheels-${{ matrix.python-version }}-${{ matrix.target }} + name: wheels-windows-${{ matrix.python-version }}-${{ matrix.target }} path: dist/*.whl macos: @@ -132,7 +132,7 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # 4.3.3 with: - name: wheels-${{ matrix.python-version }}-${{ matrix.target }} + name: wheels-macos-${{ matrix.python-version }}-${{ matrix.target }} path: dist/*.whl python-release-github: @@ -140,6 +140,8 @@ jobs: needs: [ macos, windows, linux ] permissions: contents: write # To add assets to a release. + checks: write + packages: write steps: - name: Harden Runner uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.1.0 @@ -172,7 +174,7 @@ jobs: merge-multiple: true - name: Upload release binaries - uses: alexellis/upload-assets@13926a61cdb2cb35f5fdef1c06b8b591523236d3 + uses: alexellis/upload-assets@13926a61cdb2cb35f5fdef1c06b8b591523236d3 # 0.4.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From 3aff558f4c3a9d51bb9f57655b56e416ddc90753 Mon Sep 17 00:00:00 2001 From: Cam Parry Date: Sun, 5 May 2024 22:52:21 +1000 Subject: [PATCH 9/9] dist folder --- .github/workflows/publish.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index d5ca6681..2985bf52 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -63,7 +63,7 @@ jobs: uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # 4.3.3 with: name: wheels-linux-${{ matrix.platform }} - path: dist/*.whl + path: dist windows: runs-on: windows-latest @@ -97,7 +97,7 @@ jobs: uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # 4.3.3 with: name: wheels-windows-${{ matrix.python-version }}-${{ matrix.target }} - path: dist/*.whl + path: dist macos: runs-on: macos-latest @@ -133,7 +133,7 @@ jobs: uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # 4.3.3 with: name: wheels-macos-${{ matrix.python-version }}-${{ matrix.target }} - path: dist/*.whl + path: dist python-release-github: runs-on: ubuntu-latest