forked from newrelic/node-newrelic
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (49 loc) · 1.68 KB
/
prep-release.yml
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
45
46
47
48
49
50
51
52
name: Prepare Release PR
on:
workflow_call:
inputs:
release_type:
description: Type of release. patch or minor (major if breaking)
type: string
required: false
default: patch
changelog_file:
description: Name of changelog file.
type: string
required: false
default: NEWS.md
use_new_release:
description: Whether or not to use the new conventional commit release note workflow
type: string
required: false
jobs:
generate-release-notes:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [lts/*]
steps:
# Check out caller repo
- uses: actions/checkout@v3
with:
fetch-depth: 0
# check out agent repo to agent-repo for the bin folders
- uses: actions/checkout@v3
with:
repository: newrelic/node-newrelic
path: agent-repo
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
# Only need to install deps in agent-repo because of the bin scripts
- name: Install Dependencies
run: npm ci --prefix agent-repo
- name: Setup GitHub Credentials
run: |
git config user.name $GITHUB_ACTOR
git config user.email gh-actions-${GITHUB_ACTOR}@github.com
- name: Create Release Notes
run: node ./agent-repo/bin/prepare-release.js --release-type ${{ inputs.release_type }} --branch ${{ github.ref }} --repo ${{ github.repository }} --changelog ${{ inputs.changelog_file }} ${{ inputs.use_new_release == 'true' && '--use-new-release' || '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}