Create release #100
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: Create release | |
on: | |
schedule: | |
# At 13:00 (UTC) every Wednesday. | |
- cron: '0 13 * * 3' | |
workflow_dispatch: | |
inputs: | |
version: | |
description: '⚠ be sure of yourself ⚠' | |
required: false | |
default: '' | |
debug: | |
description: 'Add DEBUG=* to the env if true' | |
type: boolean | |
default: false | |
required: false | |
jobs: | |
release: | |
environment: 'Release' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/setup | |
- name: Release | |
run: npm run release | |
env: | |
VERSION: ${{ inputs.version }} | |
DEBUG: ${{ inputs.debug && '*' || '' }} | |
RELEASER_APP_ID: ${{ secrets.RELEASER_APP_ID }} | |
RELEASER_PRIVATE_KEY: ${{ secrets.RELEASER_PRIVATE_KEY }} | |
RELEASER_CLIENT_ID: ${{ secrets.RELEASER_CLIENT_ID }} | |
RELEASER_CLIENT_SECRET: ${{ secrets.RELEASER_CLIENT_SECRET }} | |
RELEASER_INSTALLATION_ID: ${{ secrets.RELEASER_INSTALLATION_ID }} | |
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4 | |
with: | |
registry-url: 'https://npm.pkg.github.com' | |
node-version-file: '.nvmrc' | |
- name: Publish to GitHub Packages | |
run: npm run release:phase5 | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
start-deployment: | |
needs: release | |
runs-on: [coveo, linux, x64, ec2] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
with: | |
ref: 'release/v2' | |
- uses: ./.github/actions/setup | |
- name: Start deployment pipeline | |
run: node ./scripts/deploy/execute-deployment-pipeline.mjs | |
promote-prod: | |
needs: start-deployment | |
environment: 'Production' | |
runs-on: 'ubuntu-latest' | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
with: | |
ref: 'release/v2' | |
- uses: ./.github/actions/setup | |
- uses: ./.github/actions/setup-sfdx | |
- name: Promote NPM package to production | |
run: npm run promote:npm:latest | |
- name: Promote SFDX package to production | |
run: npx --no-install nx run quantic:"promote:sfdx:ci" | |
env: | |
SFDX_AUTH_CLIENT_ID: ${{ secrets.SFDX_AUTH_CLIENT_ID }} | |
SFDX_AUTH_JWT_KEY: ${{ secrets.SFDX_AUTH_JWT_KEY }} | |
SFDX_AUTH_JWT_USERNAME: ${{ secrets.SFDX_AUTH_JWT_USERNAME }} | |
- name: Notify Docs | |
run: npm run notify:docs |