Skip to content
Merged
58 changes: 40 additions & 18 deletions .github/workflows/development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,30 @@ on:
tags:
- '*.*.*'
jobs:
test-changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get changelog entry
id: changelog_reader
uses: guzman-raphael/changelog-reader-action@v5
with:
path: ./CHANGELOG.md
- name: Verify changelog parsing
env:
TAG_NAME: ${{steps.changelog_reader.outputs.version}}
RELEASE_NAME: Release ${{steps.changelog_reader.outputs.version}}
BODY: ${{steps.changelog_reader.outputs.changes}}
PRERELEASE: ${{steps.changelog_reader.outputs.status == 'prereleased'}}
DRAFT: ${{steps.changelog_reader.outputs.status == 'unreleased'}}
run: |
echo "TAG_NAME=${TAG_NAME}"
echo "RELEASE_NAME=${RELEASE_NAME}"
echo "BODY=${BODY}"
echo "PRERELEASE=${PRERELEASE}"
echo "DRAFT=${DRAFT}"
build:
needs: test-changelog
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -93,28 +116,11 @@ jobs:
run: |
PHARUS_VERSION=$(cat pharus/version.py | tail -1 | awk -F\' '{print $2}')
echo "PHARUS_VERSION=${PHARUS_VERSION}" >> $GITHUB_ENV
- name: Fetch image artifact
uses: actions/download-artifact@v2
with:
name: image-pharus-${{env.PHARUS_VERSION}}-py3.8-alpine
- name: Fetch pip artifacts
uses: actions/download-artifact@v2
with:
name: pip-pharus-${{env.PHARUS_VERSION}}
path: dist
- name: Publish pip release
run: |
export HOST_UID=$(id -u)
docker load < "image-pharus-${PHARUS_VERSION}-py3.8-alpine.tar.gz"
docker-compose -f docker-compose-build.yaml run \
-e TWINE_USERNAME=${TWINE_USERNAME} -e TWINE_PASSWORD=${TWINE_PASSWORD} pharus \
sh -lc "pip install twine && python -m twine upload dist/*"
- name: Get changelog entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
uses: guzman-raphael/changelog-reader-action@v5
with:
path: ./CHANGELOG.md
validation_depth: 10
version: ${{env.PHARUS_VERSION}}
- name: Create GH release
id: create_gh_release
Expand All @@ -127,6 +133,22 @@ jobs:
body: ${{steps.changelog_reader.outputs.changes}}
prerelease: ${{steps.changelog_reader.outputs.status == 'prereleased'}}
draft: ${{steps.changelog_reader.outputs.status == 'unreleased'}}
- name: Fetch image artifact
uses: actions/download-artifact@v2
with:
name: image-pharus-${{env.PHARUS_VERSION}}-py3.8-alpine
- name: Fetch pip artifacts
uses: actions/download-artifact@v2
with:
name: pip-pharus-${{env.PHARUS_VERSION}}
path: dist
- name: Publish pip release
run: |
export HOST_UID=$(id -u)
docker load < "image-pharus-${PHARUS_VERSION}-py3.8-alpine.tar.gz"
docker-compose -f docker-compose-build.yaml run \
-e TWINE_USERNAME=${TWINE_USERNAME} -e TWINE_PASSWORD=${TWINE_PASSWORD} pharus \
sh -lc "pip install twine && python -m twine upload dist/*"
- name: Determine pip artifact paths
run: |
echo "PHARUS_WHEEL_PATH=$(ls dist/pharus-*.whl)" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.

## [0.1.0a2] - 2021-02-18
## [0.1.0a3] - 2021-02-18
### Added
- List schemas method.
- List tables method.
Expand Down
2 changes: 1 addition & 1 deletion pharus/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""Package metadata."""
__version__ = '0.1.0a2'
__version__ = '0.1.0a3'