diff --git a/.github/workflows/make-dist.yml b/.github/workflows/make-dist.yml index 204a425..1f8486c 100644 --- a/.github/workflows/make-dist.yml +++ b/.github/workflows/make-dist.yml @@ -14,19 +14,19 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Get version tag - id: version - uses: WyriHaximus/github-action-get-previous-tag@v1 - with: - fallback: 0.1 - - name: Build dist uses: xu-cheng/texlive-action/full@v1 with: run: | apk add make git zip git config --global --add safe.directory '*' + echo "VERSION=$(make version)" >> $GITHUB_ENV make dist CTAN + + - name: Version + with: + run: | + echo "::notice:: VERSION=${{ env.VERSION }}" - name: Release uses: softprops/action-gh-release@v1 @@ -54,7 +54,7 @@ jobs: file_path: dist/CTAN/photobook.zip fields: | pkg: photobook - version: ${{ steps.version.outputs.tag }} + version: ${{ env.VERSION }} author: Alex A. Naanou email: alex.nanou@gmail.com uploader: Alex A. Naanou diff --git a/Makefile b/Makefile index fd760d0..5bc34fc 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,8 @@ MODULE := photobook VERSION = $(strip $(shell \ cat $(MODULE).cls \ | grep 'VERSION{' \ - | sed 's/.*{\(.*\)}.*/\1/')) + | sed 's/.*{\(.*\)}.*/\1/' \ + | sed 's/v//')) DATE = $(strip $(shell date "+%Y%m%d%H%M")) COMMIT = $(strip $(shell git rev-parse HEAD)) @@ -244,6 +245,11 @@ version: @echo $(VERSION) +.PHONY: tag +tag: + git tag "$(VERSION)" + + #---------------------------------------------------------------------- # Main targets... diff --git a/photobook.cls b/photobook.cls index c4f2d56..4edd579 100644 --- a/photobook.cls +++ b/photobook.cls @@ -58,7 +58,7 @@ %%% NOTE: \def\@[A-Z]+ macros will be visible to both the %%% code and the generated docs... -\edef\photobook@FILEVERSION{v0.1} +\edef\photobook@FILEVERSION{v0.1.2} \edef\photobook@FILEDATE{2021-07-28}