Skip to content

Create release

Create release #47

Workflow file for this run

name: Create release
on:
workflow_dispatch:
inputs:
branch-name:
description: The name of the branch that will be targeted by the pipeline.
required: true
jobs:
release:
permissions:
contents: write
actions: write
environment: 'Release'
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build
uses: ./.github/actions/build
- name: Create or update branch
env:
BRANCH_NAME: ${{ github.event.inputs.branch-name }}
run: node ./build/release-version.js
- name: Set Tag Name
shell: bash
run: |
echo "TAG_NAME=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Verify Tag
shell: bash
run: |
echo "Using tag: ${{ env.TAG_NAME }}"
- name: Release
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_NAME: ${{ env.TAG_NAME }}
run: |
npm run zipForGitReleases
node ./build/github-release.deploy.js
- name: Ensure a Git Tag Exists
shell: bash
run: |
if [ -z "$(git tag --list)" ]; then
echo "❌ No Git tags found. A valid tag is required for release."
exit 1
fi
echo "✅ Git tags found."
- name: Install dependencies
shell: bash
run: npm install @actions/github
- name: Call search-ui-cd
env:
GH_TOKEN: ${{ secrets.SEARCH_UI_CD_DISPATCHER }}
RELEASE_BRANCH_NAME: ${{ github.event.inputs.branch-name }}
run: node ./scripts/deploy/trigger-search-ui-cd.mjs