Skip to content
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
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.2
current_version = 0.11.3
commit = True
tag = True

Expand Down
75 changes: 54 additions & 21 deletions .github/workflows/publish-to-pypi-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand All @@ -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]"
Copy link
Contributor

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

Copy link
Author

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


- 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 }}