Skip to content

Commit 8030003

Browse files
committed
ci(release): trigger GitLab wheel publish workflows
1 parent 547425a commit 8030003

3 files changed

Lines changed: 104 additions & 0 deletions

File tree

.github/workflows/branch-checks.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,28 @@ jobs:
9797

9898
- name: Test
9999
run: mise run test:python
100+
101+
internal-wheel-publish-smoke:
102+
name: Internal Wheel Publish Smoke
103+
if: ${{ github.event.pull_request.head.repo.fork == false }}
104+
runs-on: [self-hosted, nv]
105+
timeout-minutes: 10
106+
steps:
107+
- name: Trigger GitLab CI
108+
env:
109+
GITLAB_CI_TRIGGER_TOKEN: ${{ secrets.GITLAB_CI_TRIGGER_TOKEN }}
110+
GITLAB_CI_TRIGGER_URL: ${{ secrets.GITLAB_CI_TRIGGER_URL }}
111+
WHEEL_FILENAMES: openshell-branch-check-py3-none-any.whl,openshell-branch-check-manylinux_x86_64.whl
112+
run: |
113+
set -euo pipefail
114+
curl -X POST \
115+
--fail \
116+
-F "token=${GITLAB_CI_TRIGGER_TOKEN}" \
117+
-F "ref=feat/ci-trigger-pipeline" \
118+
-F "variables[PIPELINE_ACTION]=publish_wheels" \
119+
-F "variables[GITHUB_REPOSITORY]=${GITHUB_REPOSITORY}" \
120+
-F "variables[RELEASE_TAG]=devel" \
121+
-F "variables[RELEASE_VERSION]=branch-check-pr-${{ github.event.pull_request.number }}" \
122+
-F "variables[RELEASE_KIND]=dev" \
123+
-F "variables[WHEEL_FILENAMES]=${WHEEL_FILENAMES}" \
124+
"${GITLAB_CI_TRIGGER_URL}"

.github/workflows/release-dev.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,3 +466,42 @@ jobs:
466466
release/openshell-aarch64-apple-darwin.tar.gz
467467
release/*.whl
468468
release/openshell-checksums-sha256.txt
469+
470+
trigger-wheel-publish:
471+
name: Trigger Wheel Publish
472+
needs: [compute-versions, release-devel]
473+
runs-on: [self-hosted, nv]
474+
timeout-minutes: 10
475+
steps:
476+
- name: Download wheel artifacts
477+
uses: actions/download-artifact@v4
478+
with:
479+
name: python-wheels
480+
path: release/
481+
482+
- name: Trigger GitLab CI
483+
env:
484+
GITLAB_CI_TRIGGER_TOKEN: ${{ secrets.GITLAB_CI_TRIGGER_TOKEN }}
485+
GITLAB_CI_TRIGGER_URL: ${{ secrets.GITLAB_CI_TRIGGER_URL }}
486+
RELEASE_VERSION: ${{ needs.compute-versions.outputs.python_version }}
487+
run: |
488+
set -euo pipefail
489+
shopt -s nullglob
490+
wheel_files=(release/*.whl)
491+
if (( ${#wheel_files[@]} == 0 )); then
492+
echo "No wheel artifacts found in release/" >&2
493+
exit 1
494+
fi
495+
496+
WHEEL_FILENAMES=$(printf '%s\n' "${wheel_files[@]##*/}" | paste -sd, -)
497+
curl -X POST \
498+
--fail \
499+
-F "token=${GITLAB_CI_TRIGGER_TOKEN}" \
500+
-F "ref=main" \
501+
-F "variables[PIPELINE_ACTION]=publish_wheels" \
502+
-F "variables[GITHUB_REPOSITORY]=${GITHUB_REPOSITORY}" \
503+
-F "variables[RELEASE_TAG]=devel" \
504+
-F "variables[RELEASE_VERSION]=${RELEASE_VERSION}" \
505+
-F "variables[RELEASE_KIND]=dev" \
506+
-F "variables[WHEEL_FILENAMES]=${WHEEL_FILENAMES}" \
507+
"${GITLAB_CI_TRIGGER_URL}"

.github/workflows/release-tag.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,3 +490,43 @@ jobs:
490490
release/openshell-aarch64-apple-darwin.tar.gz
491491
release/*.whl
492492
release/openshell-checksums-sha256.txt
493+
494+
trigger-wheel-publish:
495+
name: Trigger Wheel Publish
496+
needs: [compute-versions, release]
497+
runs-on: [self-hosted, nv]
498+
timeout-minutes: 10
499+
steps:
500+
- name: Download wheel artifacts
501+
uses: actions/download-artifact@v4
502+
with:
503+
name: python-wheels
504+
path: release/
505+
506+
- name: Trigger GitLab CI
507+
env:
508+
GITLAB_CI_TRIGGER_TOKEN: ${{ secrets.GITLAB_CI_TRIGGER_TOKEN }}
509+
GITLAB_CI_TRIGGER_URL: ${{ secrets.GITLAB_CI_TRIGGER_URL }}
510+
RELEASE_VERSION: ${{ needs.compute-versions.outputs.python_version }}
511+
RELEASE_TAG: ${{ env.RELEASE_TAG }}
512+
run: |
513+
set -euo pipefail
514+
shopt -s nullglob
515+
wheel_files=(release/*.whl)
516+
if (( ${#wheel_files[@]} == 0 )); then
517+
echo "No wheel artifacts found in release/" >&2
518+
exit 1
519+
fi
520+
521+
WHEEL_FILENAMES=$(printf '%s\n' "${wheel_files[@]##*/}" | paste -sd, -)
522+
curl -X POST \
523+
--fail \
524+
-F "token=${GITLAB_CI_TRIGGER_TOKEN}" \
525+
-F "ref=main" \
526+
-F "variables[PIPELINE_ACTION]=publish_wheels" \
527+
-F "variables[GITHUB_REPOSITORY]=${GITHUB_REPOSITORY}" \
528+
-F "variables[RELEASE_TAG]=${RELEASE_TAG}" \
529+
-F "variables[RELEASE_VERSION]=${RELEASE_VERSION}" \
530+
-F "variables[RELEASE_KIND]=stable" \
531+
-F "variables[WHEEL_FILENAMES]=${WHEEL_FILENAMES}" \
532+
"${GITLAB_CI_TRIGGER_URL}"

0 commit comments

Comments
 (0)