-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
be2122e
commit f7f81d4
Showing
4 changed files
with
60 additions
and
4 deletions.
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,59 @@ | ||
name: CI for releasing tagged versions | ||
|
||
on: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
|
||
jobs: | ||
build_dist: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: | | ||
pip install -U pip setuptools wheel | ||
pip install -e .[dev] | ||
- name: Build dists for Python 3.7 | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
ls dist/ | ||
- name: Extract tag name | ||
id: tag | ||
run: | | ||
echo ::set-output name=TAG::${GITHUB_REF#refs/tags/} | ||
- name: Create release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.tag.outputs.TAG }} | ||
release_name: Release ${{ steps.tag.outputs.TAG }} | ||
draft: false | ||
prerelease: false | ||
- name: Upload source distribution | ||
id: upload-source-dist-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./dist/domobot-${{ steps.tag.outputs.TAG }}.tar.gz | ||
asset_name: domobot-${{ steps.tag.outputs.TAG }}.tar.gz | ||
asset_content_type: application/gzip | ||
- name: Upload wheel distribution | ||
id: upload-wheel-dist-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./dist/domobot-${{ steps.tag.outputs.TAG }}-py3-none-any.whl | ||
asset_name: domobot-${{ steps.tag.outputs.TAG }}-py3-none-any.whl | ||
asset_content_type: application/zip |
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
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