Skip to content

Commit

Permalink
Sebastianmaj/masteronlybump (#58)
Browse files Browse the repository at this point in the history
* Version bump should only happen on master

* Changed minor to patch version bumps

* Create release once version bumped on master

* Restrict specific tasks to master only

* Quick refactor on push event

* Fix for invalid workflow sequence

* Arguments sequence fix
  • Loading branch information
Sebastian Maj authored Nov 10, 2021
1 parent bbd03b4 commit 0020a41
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.11.0
current_version = 0.11.2
commit = True
tag = True

Expand Down
29 changes: 24 additions & 5 deletions .github/workflows/publish-to-pypi-test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Publish Python 🐍 distribution 📦 to TestPyPI

on:
push:
branches-ignore:
- master
on: [push]

jobs:
rust-compile:
Expand Down Expand Up @@ -76,6 +73,7 @@ jobs:
- name: Install bump2version
run: |
python -m pip install bump2version
if: github.ref == 'refs/heads/master'

- name: Assign Git User Email
run: |
Expand Down Expand Up @@ -111,8 +109,29 @@ jobs:
uses: tj-actions/[email protected]

- name: Publish distribution 📦 to Test PyPI
if: github.ref == 'refs/heads/master'
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
if: github.ref == 'refs/heads/master'

release:
runs-on: ubuntu-latest
needs: [build-n-publish]
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@master
- name: Create release
uses: Roang-zero1/github-create-release-action@master
with:
version_regex: ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub release
uses: Roang-zero1/github-upload-release-artifacts-action@master
with:
args: '[
, ./dist/*
]'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0020a41

Please sign in to comment.