-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from davidgardenier/github_actions
Add Github actions for automated release
- Loading branch information
Showing
4 changed files
with
52 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,42 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
release-on-push: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- id: release | ||
uses: rymndhng/[email protected] | ||
with: | ||
bump_version_scheme: patch | ||
|
||
pypi-deploy: | ||
runs-on: ubuntu-latest | ||
# run only on successful release | ||
needs: release-on-push | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Set up python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: 3.8 | ||
architecture: x64 | ||
- name: Build | ||
env: | ||
VERSION: ${{ needs.release-on-push.release.outputs.version }} | ||
run: | | ||
pip install wheel | ||
echo "__version__ = '$VERSION'" > frbcat/__version__.py | ||
python setup.py sdist bdist_wheel | ||
- name: Deploy | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_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
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 @@ | ||
version = 'github' |
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