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

DO-48 ❄️ 🚀 Build stable package on git tag with SemVer #234

Merged
merged 1 commit into from
Jan 28, 2020
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- development

jobs:
development:
runs-on: ubuntu-18.04
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- master

jobs:
main:
runs-on: ubuntu-18.04
Expand Down Expand Up @@ -55,3 +56,6 @@ jobs:
- name: PyTest
run: |
pytest -v

# TODO: Add E2E tests here!!!

44 changes: 44 additions & 0 deletions .github/workflows/master_tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Package release

on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+

jobs:
main:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6

- name: Cache pip packages
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: pip-master-${{ hashFiles('setup.py') }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
pip install wheel twine

- name: Create packages
run: |
python setup.py sdist bdist_wheel

- name: Output tag name
id: get_tag_name
run: echo ::set-output name=TAG_NAME::${GITHUB_REF/refs\/tags\//}

- name: Upload packages
uses: actions/upload-artifact@v1
with:
name: ${{ steps.get_tag_name.outputs.TAG_NAME }}-release
path: dist