Skip to content

Commit 58f1a01

Browse files
Merge pull request #76 from guzman-raphael/alpha-release
Fix Publish: Fix issue with changelog parsing
2 parents dc1aa10 + 1404e68 commit 58f1a01

File tree

3 files changed

+42
-20
lines changed

3 files changed

+42
-20
lines changed

.github/workflows/development.yaml

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,30 @@ on:
55
tags:
66
- '*.*.*'
77
jobs:
8+
test-changelog:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Get changelog entry
13+
id: changelog_reader
14+
uses: guzman-raphael/changelog-reader-action@v5
15+
with:
16+
path: ./CHANGELOG.md
17+
- name: Verify changelog parsing
18+
env:
19+
TAG_NAME: ${{steps.changelog_reader.outputs.version}}
20+
RELEASE_NAME: Release ${{steps.changelog_reader.outputs.version}}
21+
BODY: ${{steps.changelog_reader.outputs.changes}}
22+
PRERELEASE: ${{steps.changelog_reader.outputs.status == 'prereleased'}}
23+
DRAFT: ${{steps.changelog_reader.outputs.status == 'unreleased'}}
24+
run: |
25+
echo "TAG_NAME=${TAG_NAME}"
26+
echo "RELEASE_NAME=${RELEASE_NAME}"
27+
echo "BODY=${BODY}"
28+
echo "PRERELEASE=${PRERELEASE}"
29+
echo "DRAFT=${DRAFT}"
830
build:
31+
needs: test-changelog
932
runs-on: ubuntu-latest
1033
strategy:
1134
matrix:
@@ -93,28 +116,11 @@ jobs:
93116
run: |
94117
PHARUS_VERSION=$(cat pharus/version.py | tail -1 | awk -F\' '{print $2}')
95118
echo "PHARUS_VERSION=${PHARUS_VERSION}" >> $GITHUB_ENV
96-
- name: Fetch image artifact
97-
uses: actions/download-artifact@v2
98-
with:
99-
name: image-pharus-${{env.PHARUS_VERSION}}-py3.8-alpine
100-
- name: Fetch pip artifacts
101-
uses: actions/download-artifact@v2
102-
with:
103-
name: pip-pharus-${{env.PHARUS_VERSION}}
104-
path: dist
105-
- name: Publish pip release
106-
run: |
107-
export HOST_UID=$(id -u)
108-
docker load < "image-pharus-${PHARUS_VERSION}-py3.8-alpine.tar.gz"
109-
docker-compose -f docker-compose-build.yaml run \
110-
-e TWINE_USERNAME=${TWINE_USERNAME} -e TWINE_PASSWORD=${TWINE_PASSWORD} pharus \
111-
sh -lc "pip install twine && python -m twine upload dist/*"
112119
- name: Get changelog entry
113120
id: changelog_reader
114-
uses: mindsers/changelog-reader-action@v2
121+
uses: guzman-raphael/changelog-reader-action@v5
115122
with:
116123
path: ./CHANGELOG.md
117-
validation_depth: 10
118124
version: ${{env.PHARUS_VERSION}}
119125
- name: Create GH release
120126
id: create_gh_release
@@ -127,6 +133,22 @@ jobs:
127133
body: ${{steps.changelog_reader.outputs.changes}}
128134
prerelease: ${{steps.changelog_reader.outputs.status == 'prereleased'}}
129135
draft: ${{steps.changelog_reader.outputs.status == 'unreleased'}}
136+
- name: Fetch image artifact
137+
uses: actions/download-artifact@v2
138+
with:
139+
name: image-pharus-${{env.PHARUS_VERSION}}-py3.8-alpine
140+
- name: Fetch pip artifacts
141+
uses: actions/download-artifact@v2
142+
with:
143+
name: pip-pharus-${{env.PHARUS_VERSION}}
144+
path: dist
145+
- name: Publish pip release
146+
run: |
147+
export HOST_UID=$(id -u)
148+
docker load < "image-pharus-${PHARUS_VERSION}-py3.8-alpine.tar.gz"
149+
docker-compose -f docker-compose-build.yaml run \
150+
-e TWINE_USERNAME=${TWINE_USERNAME} -e TWINE_PASSWORD=${TWINE_PASSWORD} pharus \
151+
sh -lc "pip install twine && python -m twine upload dist/*"
130152
- name: Determine pip artifact paths
131153
run: |
132154
echo "PHARUS_WHEEL_PATH=$(ls dist/pharus-*.whl)" >> $GITHUB_ENV

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

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

5-
## [0.1.0a2] - 2021-02-18
5+
## [0.1.0a3] - 2021-02-18
66
### Added
77
- List schemas method.
88
- List tables method.

pharus/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""Package metadata."""
2-
__version__ = '0.1.0a2'
2+
__version__ = '0.1.0a3'

0 commit comments

Comments
 (0)