forked from rdkcentral/firebolt-certification-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1.16 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Release Workflow
on:
workflow_call:
inputs:
branch:
type: string
required: true
secrets:
SEMANTIC_RELEASE_BOT_PAT:
required: true
jobs:
release:
name: Release
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Fetch changes in main
if: ${{ inputs.branch == 'main' }} # Only run this step if the branch is 'main'
uses: ./.github/actions/fetch-latest-main
- name: Install dependencies
shell: bash
run: yarn install
- name: Release to GitHub
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_PAT }} # <-- Allows semantic-release-bot to push changes to protected branches (using a PAT to avoid rate limits)
npm_config_tag: ${{ inputs.branch }} # <-- See ./.releaserc for release branch config.
run: npx semantic-release