Skip to content

Commit c1bbecc

Browse files
committed
chore: github fucking sucks
Signed-off-by: Brian Harring <ferringb@gmail.com>
1 parent a32f22d commit c1bbecc

1 file changed

Lines changed: 51 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 51 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,55 @@ jobs:
8282
if-no-files-found: error
8383

8484
publish:
85-
if: github.ref_type == 'tag' || ( github.ref_type == 'branch' || github.ref_name == 'release-test-pypi' )
85+
if: github.ref_type == 'tag'
8686
needs: [build]
87-
uses: ./.github/workflows/_publish.yml
88-
with:
89-
is_test: ${{ github.ref_type == 'tag' }}
90-
release-artifact-ids: ${{ needs.build.outputs.release-artifact-id }},${{ needs.build.outputs.wheel-artifact-id }}
87+
environment: release
88+
permissions:
89+
id-token: write # Used to authenticate to PyPI via OIDC
90+
contents: read
91+
runs-on: ubuntu-latest
92+
93+
steps:
94+
- name: Download artifacts
95+
uses: actions/download-artifact@v5
96+
with:
97+
artifact-ids: ${{ needs.build.outputs.release-artifact-id }},${{ needs.build.outputs.wheel-artifact-id }}
98+
99+
- name: debug
100+
run: find .
101+
102+
- name: Publish github source
103+
uses: softprops/action-gh-release@v2
104+
with:
105+
files: 'release-source/*.tar.*'
106+
fail_on_unmatched_files: true
107+
draft: true
108+
109+
- name: Publish to PyPi server
110+
uses: pypa/gh-action-pypi-publish@release/v1.13
111+
with:
112+
packages-dir: wheel-source/
113+
114+
test-publish:
115+
if: github.ref == '/refs/heads/release-test-pypi'
116+
needs: [build]
117+
environment: test-release
118+
permissions:
119+
id-token: write # Used to authenticate to PyPI via OIDC
120+
contents: read
121+
runs-on: ubuntu-latest
122+
123+
steps:
124+
- name: Download artifacts
125+
uses: actions/download-artifact@v5
126+
with:
127+
artifact-ids: ${{ needs.build.outputs.wheel-artifact-id }}
128+
129+
- name: debug
130+
run: find .
131+
132+
- name: Publish to Test PyPi server
133+
uses: pypa/gh-action-pypi-publish@release/v1.13
134+
with:
135+
packages-dir: wheel-source/
136+
repository-url: https://test.pypi.org/legacy

0 commit comments

Comments
 (0)