From a630598290319a49626da631ba871a73d418fd2f Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Wed, 21 Aug 2024 15:11:09 +0300 Subject: [PATCH 1/5] explicitly specify from which branch the release tag should be created from --- .github/workflows/publish-release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 3ffcabf0c..25fbb111d 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -7,6 +7,7 @@ on: description: Branch to build from default: master required: true + release_version: description: Release tag. It will be prepended by your repository name required: true @@ -45,6 +46,7 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} tag_prefix: ${{ github.event.repository.name }}- custom_tag: ${{ env.TAG }} + release_branches: ${{ github.event.inputs.branch_name }} - name: Login to DockerHub uses: docker/login-action@v3 From 77e04a3fc1fc86b19032c5f35ad9810b58f8d0a2 Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Wed, 21 Aug 2024 15:26:22 +0300 Subject: [PATCH 2/5] use release version instead of package.json version --- .github/workflows/publish-release.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 25fbb111d..4b12bc56c 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -9,7 +9,7 @@ on: required: true release_version: - description: Release tag. It will be prepended by your repository name + description: Release tag. It will be prepended by your repository name (e.g. 1.5.3 or 20240501) required: true jobs: @@ -23,12 +23,8 @@ jobs: - name: Install jq run: sudo apt-get install jq -y - - name: Read version from package.json - id: get_version - run: echo "::set-output name=version::$(jq -r '.version' package.json)" - - name: Set TAG environment variable - run: echo "TAG=v${{ steps.get_version.outputs.version }}" >> $GITHUB_ENV + run: echo "TAG=v${{ github.event.inputs.release_version }}" >> $GITHUB_ENV - uses: trstringer/manual-approval@v1 with: From 73b053318ded3dc84f8f0cc881bc40f4e83ced14 Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Wed, 21 Aug 2024 16:26:15 +0300 Subject: [PATCH 3/5] add descriptive merge messages --- .github/workflows/publish-release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 4b12bc56c..e472ac4ab 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -72,6 +72,7 @@ jobs: type: now from_branch: ${{ github.event.inputs.branch_name }} target_branch: master + message: Merge ${{ github.event.inputs.branch_name }} to master github_token: ${{ secrets.GITHUB_TOKEN }} - name: Merge master -> develop @@ -80,4 +81,5 @@ jobs: type: now from_branch: master target_branch: develop + message: Merge master back to develop github_token: ${{ secrets.GITHUB_TOKEN }} From 7f79824685d3cddbdd34edb36bc49b3ed74d7a09 Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Wed, 21 Aug 2024 16:26:54 +0300 Subject: [PATCH 4/5] remove the v-prefix from versions --- .github/workflows/publish-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index e472ac4ab..d03dd8251 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -9,7 +9,7 @@ on: required: true release_version: - description: Release tag. It will be prepended by your repository name (e.g. 1.5.3 or 20240501) + description: Release tag. It will be prepended by your repository name (e.g. v1.5.3 or 20240501) required: true jobs: @@ -24,7 +24,7 @@ jobs: run: sudo apt-get install jq -y - name: Set TAG environment variable - run: echo "TAG=v${{ github.event.inputs.release_version }}" >> $GITHUB_ENV + run: echo "TAG=${{ github.event.inputs.release_version }}" >> $GITHUB_ENV - uses: trstringer/manual-approval@v1 with: From ce251be5db640bd5563d0446d69bfcd80680715b Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Wed, 21 Aug 2024 16:57:37 +0300 Subject: [PATCH 5/5] update CHANGELOG --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aaead0ec5..18e8fc73c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,11 @@ # Changelog - ## 1.7.0 Release candidate ### Bug fixes - Kibana disk space alerts now work regardless of your disk device names. Alerts listen devices mounted both to `/` and `/data` (encrypted data partition) +- "Publish release" pipeline now correctly uses the "Branch to build from" value as the branch to be tagged. Previously it tried tagging "master". "Release tag" is also now used as the release version as is instead of it being read from `package.json`. ### Breaking changes @@ -123,7 +123,7 @@ INSERT CSV ROWS IN ENGLISH ONLY - **Check your Metabase map file.** For Metabase configuration, we renamed `farajaland-map.geojson` to `map.geojson` to not tie implementations into example country naming conventions. - **Feature flags** In order to make application config settings more readable, we re-organised `src/api/application/application-config-default.ts` with a clear feature flag block like so. These are then used across the front and back end of the application to control configurable functionality. New feature flags DEATH_REGISTRATION allow you to optionally run off death registration if your country doesnt want to run its first pilot including death and PRINT_DECLARATION (see New Features) have been added. `FEATURES: { - DEATH_REGISTRATION: true, + DEATH_REGISTRATION: true, MARRIAGE_REGISTRATION: false, ... } `