From f4995ddb18c723f0b6b46e5f2109a9fd1082a6d7 Mon Sep 17 00:00:00 2001 From: Johnny Huynh <27847622+johnnyhuy@users.noreply.github.com> Date: Sun, 21 Apr 2024 10:06:15 +1000 Subject: [PATCH] Improve release workflow and setup GitHub actions - Add GitHub token environment variable for workflow - Create `release-drafter` and `make publish` steps in workflow - Pass version information between steps in workflow via environment variables --- .github/workflows/release.yaml | 9 ++++++--- Makefile | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e7118a4..dbb6be5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,12 +14,15 @@ jobs: release: runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: - uses: release-drafter/release-drafter@v5 + id: drafter with: version: ${{ github.ref_name }} publish: true + - run: make publish env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - run: make publish-package - - run: make publish-image \ No newline at end of file + VERSION: ${{ steps.drafter.outputs.tag_name }} \ No newline at end of file diff --git a/Makefile b/Makefile index 1b9571e..cf19383 100644 --- a/Makefile +++ b/Makefile @@ -52,6 +52,8 @@ build: build-image: docker compose build +publish: publish-package publish-image + publish-package: rm -rdf dist $(MAKE) build