-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make publishing to true pypi happen only on tag push
- Loading branch information
1 parent
de601fe
commit 431136a
Showing
3 changed files
with
34 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
name: Bump version | ||
name: Bump Version and Deploy | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
build: | ||
bump-version-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Bump version and push tag | ||
uses: mathieudutour/github-tag-action@v4.2 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
github_token: ${{ secrets.bump_version }} | ||
default_bump: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
build-n-publish: | ||
name: To PyPI and TestPyPI | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@master | ||
# https://github.com/ansible/pylibssh/blob/1e7b17f/.github/workflows/build-test-n-publish.yml#L146-L151 | ||
- name: Get history and tags for SCM versioning to work | ||
run: | | ||
git fetch --prune --unshallow | ||
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
git describe --tags | ||
git describe --tags $(git rev-list --tags --max-count=1) | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
- name: Install pep517 | ||
run: | | ||
python -m pip install pep517 --user | ||
python setup.py --version | ||
- name: Build a binary wheel and a source tarball | ||
run: python -m pep517.build --binary --source --out-dir dist . | ||
- name: Publish distribution 📦 to Test PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.test_pypi_password }} | ||
repository_url: https://test.pypi.org/legacy/ |