Skip to content

Commit 2e08225

Browse files
authored
Merge branch 'master' into Yang-33-patch-1
2 parents f104ffd + 3ce7e6b commit 2e08225

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
fi
3939
4040
VERSION=${VERSION#v}
41+
echo "VERSION=$VERSION" >> $GITHUB_ENV
4142
python tools/update_version.py $VERSION
4243
- name: Build and publish
4344
env:
@@ -46,3 +47,22 @@ jobs:
4647
run: |
4748
python setup.py sdist bdist_wheel
4849
twine upload dist/*
50+
51+
- name: Create GitHub Issue on Failure
52+
if: failure()
53+
uses: actions/github-script@v7
54+
with:
55+
script: |
56+
const { owner, repo } = context.repo;
57+
const version = process.env.VERSION;
58+
const issueTitle = `Release job for ${version} failed`;
59+
const issueBody = `The release job failed. Please check the [workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for more details.`;
60+
const assignees = [context.actor];
61+
62+
await github.rest.issues.create({
63+
owner,
64+
repo,
65+
title: issueTitle,
66+
body: issueBody,
67+
assignees
68+
});

0 commit comments

Comments
 (0)