-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sebastianmaj/masteronlybump #60
Closed
Closed
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
233ea9a
Version bump should only happen on master
a5a9951
Changed minor to patch version bumps
06d3a4c
Create release once version bumped on master
6d353d7
Merge branch 'master' into sebastianmaj/masteronlybump
193fdbb
Restrict specific tasks to master only
9658021
Merge branch 'sebastianmaj/masteronlybump' of github.com:NebraLtd/hm-…
e84b38e
Quick refactor on push event
c003067
Fix for invalid workflow sequence
9c4c1a6
Arguments sequence fix
3aacd77
Updated version on master
c2cdb08
Merge branch 'master' into sebastianmaj/masteronlybump
1cb5dee
Prevent possible loop
a25c931
Merge branch 'sebastianmaj/masteronlybump' of github.com:NebraLtd/hm-…
d73cbc7
Patch up workflow
4726af5
Working auto release after bump version
b0dff57
Got this working with 1 workflow and GITHUB_TOKEN
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,5 +1,5 @@ | ||
[bumpversion] | ||
current_version = 0.11.2 | ||
current_version = 0.11.3 | ||
commit = True | ||
tag = True | ||
|
||
|
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 |
---|---|---|
|
@@ -46,7 +46,11 @@ jobs: | |
needs: [rust-compile] | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/checkout@v2 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
|
@@ -86,14 +90,14 @@ jobs: | |
- name: Bump Version | ||
run: | | ||
bump2version patch setup.py | ||
if: github.ref == 'refs/heads/master' | ||
if: ${{ (github.ref == 'refs/heads/master' && ! contains(toJSON(github.event.commits.*.message), 'Bump version:')) }} | ||
|
||
- name: Push Commit from Bump2Version | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ github.ref }} | ||
if: github.ref == 'refs/heads/master' | ||
if: ${{ (github.ref == 'refs/heads/master' && ! contains(toJSON(github.event.commits.*.message), 'Bump version:')) }} | ||
|
||
- name: Build a binary wheel and a source tarball | ||
run: | | ||
|
@@ -113,25 +117,54 @@ jobs: | |
with: | ||
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
if: github.ref == 'refs/heads/master' | ||
if: ${{ (github.ref == 'refs/heads/master' && ! contains(toJSON(github.event.commits.*.message), 'Bump version:')) }} | ||
|
||
|
||
release: | ||
runs-on: ubuntu-latest | ||
name: Release build on git | ||
runs-on: ubuntu-18.04 | ||
needs: [build-n-publish] | ||
if: github.ref == 'refs/heads/master' | ||
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 }} | ||
- uses: actions/checkout@v2 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Install pypa/build | ||
run: | | ||
python -m pip install build --user | ||
|
||
- name: Assign Git User Email | ||
run: | | ||
git config --global user.email "[email protected]" | ||
|
||
- name: Assign Git User Name | ||
run: | | ||
git config --global user.name "Mr Bump Nebra" | ||
|
||
- name: Build a binary wheel and a source tarball | ||
run: | | ||
python -m build --sdist --wheel --outdir dist/ . | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheels | ||
path: ./dist/* | ||
|
||
- name: 'Get Previous tag' | ||
id: previoustag | ||
uses: "WyriHaximus/github-action-get-previous-tag@v1" | ||
|
||
- uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "dist/*" | ||
# bodyFile: "body.md" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ steps.previoustag.outputs.tag }} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surprised we need to do this config, don't see anything similar in hm-miner: https://github.com/NebraLtd/hm-miner/blob/master/.github/workflows/check-latest-release.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for the commit that Mr. Bump is doing, it gave me an error the first time I implemented him saying unknown user and to set the name + email