Skip to content

Commit 6872b7e

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

3 files changed

Lines changed: 52 additions & 52 deletions

File tree

.github/workflows/_publish.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.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+
merge-multiple: true # store both in the root, not in named directories
98+
artifact-ids: ${{ needs.build.outputs.release-artifact-id }},${{ needs.build.outputs.wheel-artifact-id }}
99+
100+
- name: debug
101+
run: find .
102+
103+
- name: Publish github source
104+
uses: softprops/action-gh-release@v2
105+
with:
106+
files: '*.tar.*'
107+
fail_on_unmatched_files: true
108+
draft: true
109+
110+
- name: Publish to PyPi server
111+
uses: pypa/gh-action-pypi-publish@release/v1.13
112+
113+
test-publish:
114+
# use the full form to ensure insane tags and errors in 'on' filter still don't kick.
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+
merge-multiple: true
128+
artifact-ids: ${{ needs.build.outputs.wheel-artifact-id }}
129+
130+
- name: debug
131+
run: find .
132+
133+
- name: Publish to Test PyPi server
134+
uses: pypa/gh-action-pypi-publish@release/v1.13
135+
with:
136+
repository-url: https://test.pypi.org/legacy

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: test
22

33
on:
44
push:
5-
branches-ignore: [deploy]
5+
branches-ignore: [deploy, release-test-pypi]
66
pull_request:
77
branches: [master]
88
workflow_call:

0 commit comments

Comments
 (0)