From 1f1b57cb43e064865322427875b8efc3d8d7d598 Mon Sep 17 00:00:00 2001 From: Erik Jaegervall Date: Tue, 26 Nov 2024 10:12:22 +0100 Subject: [PATCH 1/3] Change release flow --- .github/workflows/create_draft_release.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/create_draft_release.yml b/.github/workflows/create_draft_release.yml index 221d5f9d..58716ec5 100644 --- a/.github/workflows/create_draft_release.yml +++ b/.github/workflows/create_draft_release.yml @@ -14,17 +14,11 @@ name: Create Draft Release on: - workflow_dispatch: # input version manually. Overrides push tag - inputs: - tag: - description: "Release version, eg:latest, 0.2.1" - required: true - default: "0.0.0" + workflow_dispatch: # select tag when creating + push: + tags: + - "*.*.*" - # As of today trigger only manually - #push: - # tags: - # - "*.*.*" # Needed if GITHUB_TOKEN by default do not have right to create release permissions: @@ -87,8 +81,7 @@ jobs: ls -R build-artifacts cd build-artifacts # Rename, add release name (usually tag) - for f in databroker*.tar.gz; do mv "$f" "$(echo "$f" | sed s/.tar.gz/-${{ needs.get_version.outputs.version }}.tar.gz/)"; done - + for f in databroker*.tar.gz; do mv "$f" "$(echo "$f" | sed s/.tar.gz/-${{ github.ref_name }}.tar.gz/)"; done - name: Create release id: create_release @@ -96,7 +89,7 @@ jobs: # if: startsWith(github.ref, 'refs/tags/' with: draft: true - tag_name: KUKSA Databroker ${{ needs.get_version.outputs.version }} + name: KUKSA Databroker ${{ github.ref_name }} fail_on_unmatched_files: true files: | build-artifacts/* From 2f500591960397359f30aff50dd7a724b8845635 Mon Sep 17 00:00:00 2001 From: Erik Jaegervall Date: Thu, 12 Dec 2024 11:17:42 +0100 Subject: [PATCH 2/3] Remove possibility to trigger manually Shall not be needed --- .github/workflows/create_draft_release.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/create_draft_release.yml b/.github/workflows/create_draft_release.yml index 58716ec5..d192bbac 100644 --- a/.github/workflows/create_draft_release.yml +++ b/.github/workflows/create_draft_release.yml @@ -14,12 +14,10 @@ name: Create Draft Release on: - workflow_dispatch: # select tag when creating push: tags: - "*.*.*" - # Needed if GITHUB_TOKEN by default do not have right to create release permissions: contents: write From 8f564e11c7e8608c3f3202f10bb231acd9f03e35 Mon Sep 17 00:00:00 2001 From: Erik Jaegervall Date: Thu, 12 Dec 2024 11:24:13 +0100 Subject: [PATCH 3/3] More changes --- .github/workflows/create_draft_release.yml | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/.github/workflows/create_draft_release.yml b/.github/workflows/create_draft_release.yml index d192bbac..c3c84e89 100644 --- a/.github/workflows/create_draft_release.yml +++ b/.github/workflows/create_draft_release.yml @@ -24,25 +24,6 @@ permissions: packages: write jobs: - get_version: - runs-on: ubuntu-latest - # Map a step output to a job output - outputs: - version: ${{ steps.eval_version.outputs.version }} - steps: - - name: Get tag or user release version - id: eval_version - run: | - GIT_VER="${GITHUB_REF/refs\/tags\//}" - echo "### Detected tag: $GIT_VER" - if [ -n "${{ github.event.inputs.tag }}" ]; then - GIT_VER="${{ github.event.inputs.tag }}" - echo "Forced release version: $GIT_VER" - echo "version=${GIT_VER}" >> $GITHUB_OUTPUT - else - echo "version=${GIT_VER}" >> $GITHUB_OUTPUT - fi - call_kuksa_databroker_build: uses: ./.github/workflows/kuksa_databroker_build.yml secrets: @@ -58,7 +39,6 @@ jobs: runs-on: ubuntu-latest needs: [ - get_version, call_kuksa_databroker_build, call_kuksa_databroker-cli_build, ]