diff --git a/.github/workflows/development.yaml b/.github/workflows/development.yaml index 0b1435d..23e0231 100644 --- a/.github/workflows/development.yaml +++ b/.github/workflows/development.yaml @@ -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: @@ -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 @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c08806..b185d48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/pharus/version.py b/pharus/version.py index e64039d..44c506c 100644 --- a/pharus/version.py +++ b/pharus/version.py @@ -1,2 +1,2 @@ """Package metadata.""" -__version__ = '0.1.0a2' +__version__ = '0.1.0a3'