Skip to content

Commit b169bd2

Browse files
committed
added cleanup
1 parent 371d074 commit b169bd2

2 files changed

Lines changed: 32 additions & 1 deletion

File tree

‎.github/workflows/python-publish.yml‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,35 @@ jobs:
5353
merge-multiple: true
5454
- uses: pypa/gh-action-pypi-publish@release/v1
5555

56+
cleanup:
57+
runs-on: ubuntu-latest
58+
if: failure() # only run this job if another job failed
59+
needs: [build_wheels]
60+
steps:
61+
- name: Delete release
62+
uses: actions/github-script@v7
63+
with:
64+
github-token: ${{ secrets.GITHUB_TOKEN }}
65+
script: |
66+
const release_id = context.payload.release.id;
67+
await github.rest.repos.deleteRelease({
68+
owner: context.repo.owner,
69+
repo: context.repo.repo,
70+
release_id: release_id,
71+
});
72+
console.log(`Deleted release ${release_id}`);
73+
74+
- name: Delete tag
75+
uses: actions/github-script@v7
76+
with:
77+
github-token: ${{ secrets.GITHUB_TOKEN }}
78+
script: |
79+
const tag = context.payload.release.tag_name;
80+
await github.rest.git.deleteRef({
81+
owner: context.repo.owner,
82+
repo: context.repo.repo,
83+
ref: `tags/${tag}`,
84+
});
85+
console.log(`Deleted tag ${tag}`);
86+
5687

‎setup.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
with open("README.md", "r", encoding="Latin-1") as fh:
1212
long_description = fh.read()
1313

14-
__version__ = "1.0.13"
14+
__version__ = "1.1.0"
1515

1616
if platform.system() in ("Linux", "Darwin"):
1717
os.environ["CC"] = "g++"

0 commit comments

Comments
 (0)