Skip to content

Commit

Permalink
chore: set GITHUB_TOKEN
Browse files Browse the repository at this point in the history
  • Loading branch information
msudgh committed Dec 18, 2023
1 parent da5f4ce commit a8c0ffd
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,27 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 'lts/20' # Ensure this version matches your project's requirements

- name: Install dependencies
run: npm ci
run: npm ci # 'npm ci' is more efficient and reliable for CI/CD environments

- name: Configure Git identity
run: |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config --global user.name "${GITHUB_ACTOR}"
env:
GITHUB_ACTOR: ${{ github.actor }}

- name: Update Changelog
run: npx standard-version --release-as ${{ github.event.pull_request.title }}
run: npx standard-version --release-as "${{ github.event.pull_request.title }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Include this if your script interacts with GitHub API

- name: Commit and Push Changes
run: |
git add CHANGELOG.md package.json package-lock.json
git commit -m "chore(release): Update Changelog for PR ${{ github.event.pull_request.number }}"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Required for pushing changes

0 comments on commit a8c0ffd

Please sign in to comment.