Skip to content

Create release

Create release #71

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
permissions:
contents: read
jobs:
release:
permissions:
contents: write
actions: write
id-token: write
environment: 'Release'
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create or Update Branch
env:
BRANCH_NAME: ${{ github.event.inputs.branch-name }}
run: node ./build/release-version.js
- name: Build and Run Unit Tests
uses: ./.github/actions/build
- name: Set Tag Name
shell: bash
run: |
echo "TAG_NAME=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
echo "Using tag: ${{ env.TAG_NAME }}"
- name: Create release package in Github
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_NAME: ${{ env.TAG_NAME }}
run: |
npm run zipForGitReleases
node ./build/github-release.deploy.js
- name: Upload Github release to NPM
shell: bash
env:
TAG_NAME: ${{ env.TAG_NAME }}
run: |
node ./build/npm.deploy.js
- name: Trigger search-ui-cd workflow
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