Skip to content
This repository has been archived by the owner on Apr 2, 2022. It is now read-only.

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
J535D165 committed Mar 23, 2020
1 parent 964358c commit fb763e7
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 1 deletion.
63 changes: 63 additions & 0 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Deploy and release

on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Get the version (git tag)
id: get_version
run: |
echo ${GITHUB_REF/refs\/tags\/v/}
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Build
run: |
python setup.py sdist bdist_wheel
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset (Wheel)
id: upload-release-asset-whl
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/asreview_covid19-${{ steps.get_version.outputs.VERSION }}-py3-none-any.whl
asset_name: asreview_covid19-${{ steps.get_version.outputs.VERSION }}-py3-none-any.whl
asset_content_type: application/x-wheel+zip
- name: Upload Release Asset (Sdist)
id: upload-release-asset-sdist
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/asreview-covid19-${{ steps.get_version.outputs.VERSION }}.tar.gz
asset_name: asreview-covid19-${{ steps.get_version.outputs.VERSION }}.tar.gz
asset_content_type: application/zip
- name: Publish package
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
2 changes: 1 addition & 1 deletion asreviewcontrib/covid19/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from asreviewcontrib.covid19.datasets import Covid19DataGroup

__version__ = "0.1"
__version__ = "0.1.1"
__extension_name__ = "asreview-covid19"

0 comments on commit fb763e7

Please sign in to comment.