-
Notifications
You must be signed in to change notification settings - Fork 2
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
81abae7
commit b9dd291
Showing
3 changed files
with
62 additions
and
10 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,20 @@ | ||
name: 'Prepare Poetry environment' | ||
description: 'This composite actions checks out out the project, installs Poetry, and install the project in the Poetry environment' | ||
inputs: | ||
python-version: | ||
description: 'The Python version to use' | ||
required: true | ||
default: '3.8' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.4.0 | ||
- name: Install dependencies | ||
run: poetry install |
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,37 @@ | ||
name: Build & Publish | ||
|
||
on: | ||
push: | ||
tags: '**' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
cd-job: | ||
name: Continues Delivery | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: SCM Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: ./.github/actions/prepare_poetry_env | ||
|
||
- name: Build Artifacts | ||
run: poetry build | ||
|
||
- name: PyPi Release | ||
env: | ||
POETRY_HTTP_BASIC_PYPI_USERNAME: "__token__" | ||
POETRY_HTTP_BASIC_PYPI_PASSWORD: "${{ secrets.PYPI_TOKEN }}" | ||
run: poetry publish | ||
|
||
- name: GitHub Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: > | ||
gh release create ${GITHUB_REF_NAME} | ||
--title ${GITHUB_REF_NAME} -F "./doc/changes/changes_${GITHUB_REF_NAME}.md" | ||
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 |
---|---|---|
|
@@ -11,13 +11,8 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Poetry | ||
uses: abatilo/[email protected] | ||
- name: Install dependencies | ||
run: poetry install | ||
- name: Run pytest | ||
run: poetry run python3 -m pytest | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python & Poetry Environment | ||
uses: ./.github/actions/prepare_poetry_env | ||
- name: Run pytest | ||
run: poetry run python3 -m pytest |