diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 3ffcabf0c..d03dd8251 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -7,8 +7,9 @@ on: description: Branch to build from default: master 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. v1.5.3 or 20240501) required: true jobs: @@ -22,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=${{ github.event.inputs.release_version }}" >> $GITHUB_ENV - uses: trstringer/manual-approval@v1 with: @@ -45,6 +42,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 @@ -74,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 @@ -82,4 +81,5 @@ jobs: type: now from_branch: master target_branch: develop + message: Merge master back to develop github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index ed63b9209..b05f92dc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - Protect individual certificate endpoint with token - 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`. - Environment creator script now requires countries to provide a Github token with no expiry date. This is to reduce effort in keeping the token up to date. ### New features