Skip to content

Commit

Permalink
chore: added action to output changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
jsalaber committed May 17, 2024
1 parent aee5894 commit dfeffe1
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build Changelog

on:
pull_request

jobs:
build-changelog:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
env:
# The setup-node action configures this env var as the source for the npm auth token
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

steps:
# Check out the repo with credentials that can bypass branch protection, and fetch git history instead of just latest commit
- uses: actions/checkout@v4
with:
token: ${{ secrets.AUTOMATION_USER_TOKEN }}
fetch-depth: 0

- name: Configure git
run: |
git config --global user.email "[email protected]"
git config --global user.name "DevCycle Automation"
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Validate npm config and auth
run: |
npm config list
npm whoami
- run: yarn --immutable

- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}

- name: Output Changelog
run: echo CHANGELOG.md

Empty file added sdk/react/CHANGELOG.md
Empty file.
7 changes: 7 additions & 0 deletions sdk/react/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@
"codeCoverage": true
}
},
"build-changelog": {
"executor": "nx:run-commands",
"options": {
"command": "yarn run -T standard-version",
"cwd": "sdk/react"
}
},
"npm-publish": {
"executor": "nx:run-commands",
"options": {
Expand Down

0 comments on commit dfeffe1

Please sign in to comment.