Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f28c929

Browse files
authored
Merge pull request #16867 from QuLogic/auto-wheel
BLD: Auto-trigger macOS/Linux wheels on tags.
2 parents 50959b5 + 661f052 commit f28c929

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/wheels.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
on:
2+
push:
3+
tags:
4+
- 'v[0-9]+.[0-9]+.[0-9]+*'
5+
jobs:
6+
trigger_wheel_builds:
7+
runs-on: ubuntu-latest
8+
name: Trigger macOS and manylinux wheel builds
9+
if: github.repository == 'matplotlib/matplotlib'
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
with:
14+
repository: MacPython/matplotlib-wheels
15+
ssh-key: ${{ secrets.WHEEL_DEPLOY_KEY }}
16+
fetch-depth: 0
17+
- name: Prepare build commit
18+
id: commit
19+
shell: bash
20+
run: |
21+
TAG="${GITHUB_REF#refs/tags/}"
22+
BRANCH="$(echo ${TAG} | sed 's/^v\([0-9]\+\.[0-9]\+\)\.[0-9]\+.*$/build-\1.x/')"
23+
echo "${BRANCH}"
24+
echo "##[set-output name=branch;]${BRANCH}"
25+
git branch ${BRANCH} master || true
26+
git checkout ${BRANCH}
27+
sed -i -e "s/\(- BUILD_COMMIT=\).\+/\1${TAG}/g" .travis.yml
28+
git add .travis.yml
29+
git config --global user.name 'Matplotlib Actions Bot'
30+
git config --global user.email '[email protected]'
31+
git commit -m "REL: $TAG"
32+
- name: Push to matplotlib-wheels
33+
run: |
34+
git push origin ${{ steps.commit.outputs.branch }}

0 commit comments

Comments
 (0)