Skip to content
This repository was archived by the owner on Jun 14, 2023. It is now read-only.

Commit 3c8dc98

Browse files
authored
Merge pull request #40 from MetacitySuite/dev
Bug fixes to CI
2 parents 60acd48 + f3da462 commit 3c8dc98

File tree

2 files changed

+32
-51
lines changed

2 files changed

+32
-51
lines changed

.github/workflows/ci.yaml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
pip install coveralls
4646
coveralls
4747
48-
tag:
48+
tag-and-release:
4949
runs-on: ubuntu-latest
5050
if: github.event_name == 'push' && contains(github.ref, 'release')
5151
needs: test
@@ -65,4 +65,35 @@ jobs:
6565
- uses: rickstaa/action-create-tag@v1
6666
with:
6767
tag: ${{ env.CURRENT_VERSION }}
68+
- uses: ncipollo/release-action@v1
69+
with:
70+
token: ${{ secrets.GITHUB_TOKEN }}
71+
generateReleaseNotes: true
72+
tag: ${{ env.CURRENT_VERSION }}
73+
- name: Install dependencies
74+
run: |
75+
python -m pip install --upgrade pip
76+
- name: Prepare for dist
77+
run: |
78+
python setup.py sdist
79+
- name: Publish package
80+
uses: pypa/gh-action-pypi-publish@release/v1
81+
with:
82+
user: __token__
83+
password: ${{ secrets.PYPI_API_TOKEN }}
6884

85+
abort:
86+
runs-on: ubuntu-latest
87+
needs: tag-and-release
88+
if: always() && contains(needs.tag-and-release.result, 'failure')
89+
steps:
90+
- uses: actions/checkout@v2
91+
with:
92+
submodules: 'recursive'
93+
- uses: actions/github-script@v6
94+
with:
95+
github-token: ${{secrets.GITHUB_TOKEN}}
96+
script: |
97+
const { owner, repo } = context.repo
98+
const { data: { id } } = await github.rest.repos.getLatestRelease({ owner, repo })
99+
await github.rest.repos.deleteRelease({ owner, repo, release_id: id })

.github/workflows/release.yaml

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

0 commit comments

Comments
 (0)