Merge pull request #326 from CartoDB/release/2023.9.20-rc.7 #64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release - Autotag | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- VERSION | |
jobs: | |
create-tag: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Retrieve Release Version | |
id: info | |
run: echo "release-version=$(cat VERSION)" >> ${GITHUB_OUTPUT} | |
- name: Check version | |
id: version | |
env: | |
RELEASE_VERSION: ${{ steps.info.outputs.release-version }} | |
shell: bash | |
run: | | |
set -eu | |
RELEASE_VERSION_NORMALIZED="${RELEASE_VERSION//-rc.*/}" | |
echo "RELEASE_VERSION_NORMALIZED=${RELEASE_VERSION_NORMALIZED}" | |
echo "release-version-normalized=${RELEASE_VERSION_NORMALIZED}" >> $GITHUB_OUTPUT | |
RC_REGEX="^20[0-9]{2}.([1-9]|1[012]).([1-9]|[12][0-9]|3[01])-rc.[0-9.]+$" | |
if [[ "${RELEASE_VERSION}" =~ ${RC_REGEX} ]]; then | |
echo "This is a Release Candidate... We will create a prerelease" | |
echo "prerelease=true" >> ${GITHUB_OUTPUT} | |
else | |
echo "We will create a Release" | |
echo "prerelease=false" >> ${GITHUB_OUTPUT} | |
fi | |
- uses: ncipollo/release-action@v1 | |
with: | |
token: ${{ secrets.X_GITHUB_CARTOFANTE }} | |
commit: ${{ github.sha }} | |
name: ${{ steps.info.outputs.release-version }} | |
tag: ${{ steps.info.outputs.release-version }} | |
prerelease: ${{ steps.version.outputs.prerelease }} | |
body: "Release notes for this version are available at https://docs.carto.com/get-help/deployment-options/self-hosted/release-notes#${{ steps.version.outputs.release-version-normalized }}" |