Skip to content

Commit

Permalink
Merge pull request #120 from crgz/test-commit-on-label
Browse files Browse the repository at this point in the history
Test commit on label
  • Loading branch information
crgz authored Oct 9, 2022
2 parents 1049d75 + 85c8382 commit 8a6ddec
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.0.315
current_version = 0.0.316
commit = True
tag = True

Expand Down
4 changes: 2 additions & 2 deletions .github/badges/release.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 2 additions & 6 deletions .github/workflows/03-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ on:
jobs:
release:
name: Create a new release based on current version
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release')
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout Library Repository
uses: actions/checkout@v3
- name: Install GitHub Command Line Interface
run: make /usr/bin/hub
- name: Set the VERSION variable int he GitHub Environment
run: echo "VERSION=$(awk -F=' ' '/current_version/{printf "v%s",$2}' .bumpversion.cfg)" >> $GITHUB_ENV
- name: Create a new release based on current version
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
run: hub release create -m ${{ env.VERSION }} ${{ env.VERSION }}
run: make release-if-new-version
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ test: prolog
bump: $(PACKAGE_PATH)/bumpversion
bumpversion --allow-dirty --no-commit --no-tag --list patch

release-if-new-version: $(PACKAGE_PATH)/hub
LOCAL_VERSION=$$(awk -F=' ' '/current_version/{printf "v%s",$$2}' .bumpversion.cfg) ;\
REMOTE_VERSION=$$(curl --silent 'https://api.github.com/repos/crgz/$(NAME)/releases/latest' | jq -r .tag_name) ;\
if [ $$LOCAL_VERSION == $$REMOTE_VERSION ]; then exit; fi ;\
hub release create -m $$LOCAL_VERSION $$LOCAL_VERSION

release: dependencies committer
@git pull --quiet --no-edit origin main
@git diff --quiet || (echo 'Exiting operation on dirty repo' && exit )
Expand Down
2 changes: 1 addition & 1 deletion pack.pl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name(abbreviated_dates).
title('Parses abbreviated and ambiguous dates in multiple languages').
version('0.0.315').
version('0.0.316').

author('Conrado M. Rodriguez','conrado.rgz@gmail.com').
maintainer('Conrado M. Rodriguez','conrado.rgz@gmail.com').
Expand Down
1 change: 1 addition & 0 deletions prolog/demo.pl
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
cli_table(Y,[head(['Date','Language','Country'])]).

print_dates('11-09, št').

0 comments on commit 8a6ddec

Please sign in to comment.