-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add automatic versioning, build/release actions
- Loading branch information
Martin Vejnár
committed
Feb 17, 2020
1 parent
ce5542c
commit 76991ab
Showing
4 changed files
with
59 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: build | ||
on: | ||
push: | ||
branches-ignore: | ||
- release | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: avakar/derive-version@85d631f1a12b084b2592d1160b3c9154ceea7ea8 | ||
id: version | ||
- run: sed -i 's/{version}/${{ steps.version.outputs.version }}+${{ github.sha }}/g' setup.py | ||
- run: python3 -m pip install setuptools wheel | ||
- run: python3 setup.py sdist bdist_wheel | ||
- uses: actions/[email protected] | ||
with: | ||
name: pe_tools-${{ steps.version.outputs.version }}+${{ github.sha }} | ||
path: dist |
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,30 @@ | ||
name: release | ||
on: | ||
push: | ||
branches: | ||
- release | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: avakar/derive-version@85d631f1a12b084b2592d1160b3c9154ceea7ea8 | ||
id: version | ||
- run: sed -i 's/{version}/${{ steps.version.outputs.version }}/g' setup.py | ||
- run: python3 -m pip install setuptools wheel | ||
- run: python3 -m pip install twine | ||
- run: python3 setup.py sdist bdist_wheel | ||
- uses: actions/[email protected] | ||
with: | ||
name: pe_tools-${{ steps.version.outputs.version }} | ||
path: dist | ||
- name: Upload to PyPI | ||
run: | | ||
python3 -m twine upload -u avakar -p "${{ secrets.pypi_password }}" dist/* | ||
- uses: avakar/tag-and-release@8f4b627f03fe59381267d3925d39191e27f44236 | ||
with: | ||
tag_name: v${{ steps.version.outputs.version }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 @@ | ||
0.3 |
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