From 79a42da30f58edb601106ac5a91c87b890cfeed8 Mon Sep 17 00:00:00 2001 From: Johnny Huynh <27847622+johnnyhuy@users.noreply.github.com> Date: Sun, 21 Apr 2024 11:10:48 +1000 Subject: [PATCH] Optimize GitHub actions and versioning configurations - Modify release workflow to include new environment variable and change publish settings - Update Makefile to enhance version variable assignment --- .github/workflows/release.yaml | 11 ++++++++--- Makefile | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7ecc6db..152db1a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,12 +16,14 @@ jobs: outputs: tag_name: ${{ steps.drafter.outputs.tag_name }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: - uses: release-drafter/release-drafter@v5 id: drafter with: - version: ${{ github.ref_name }} - publish: true + publish: false publish: runs-on: ubuntu-latest @@ -36,4 +38,7 @@ jobs: - uses: asdf-vm/actions/install@v3 - run: make publish env: - VERSION: ${{ needs.release.outputs.tag_name }} \ No newline at end of file + VERSION: ${{ needs.release.outputs.tag_name }} + - uses: release-drafter/release-drafter@v5 + with: + publish: true \ No newline at end of file diff --git a/Makefile b/Makefile index 027f939..e6e7d5e 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VENV := . venv/bin/activate && TAG := $(shell git describe --tags --abbrev=0) -VERSION ?= $(shell git describe --tags) +VERSION ?= $(shell git describe --tags --always) -include .env export