Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Commit

Permalink
build(GALAXY): support pure semantic versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
niall-byrne committed Feb 18, 2023
1 parent 99c8215 commit d24c5d2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ set -eo pipefail
main() {

echo "{}" > package.json
TAG="$(git tag | sort --version-sort | tail -n 2 | head -n 1)"
TAG="$(git tag | tr -d "v" | sort --version-sort | tail -n 2 | head -n 1)"
git tag | grep "^${TAG}\$" || TAG="v${TAG}"
CHANGE_LOG_CONTENT="$(npx -q generate-changelog -f - -t "${TAG}")"

{
echo "CHANGE_LOG_CONTENT<<EOF"
echo "${CHANGE_LOG_CONTENT}"
Expand Down
4 changes: 1 addition & 3 deletions .github/scripts/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
set -eo pipefail

main() {
pip install poetry

if [[ "v$(poetry version -s)" != "${BRANCH_OR_TAG}" ]]; then
if [[ "$(poetry version -s)" != "${BRANCH_OR_TAG}" ]]; then
echo "The 'pyproject.toml' file does not match the version tag!"
exit 127
fi
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
id: branch_filter
run: |
MATCH="FALSE"
[[ "${{ github.event.ref }}" =~ /tags/v\.* ]] && MATCH="TRUE"
[[ "${{ github.event.ref }}" =~ /tags/[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$ ]] && MATCH="TRUE"
echo "MATCH=${MATCH}" >> $GITHUB_OUTPUT
- name: Create Release -- Checkout Repository
Expand All @@ -91,6 +91,11 @@ jobs:
env:
WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

- name: Create Release -- Install Poetry
if: steps.branch_filter.outputs.match == 'TRUE'
run: |
source ./.github/scripts/poetry.sh
- name: Create Release -- Check 'pyproject.toml' Matches Tag
if: steps.branch_filter.outputs.match == 'TRUE'
run: |
Expand Down

0 comments on commit d24c5d2

Please sign in to comment.