v1.1.0 #2
Workflow file for this run
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: Release Changelog | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
jobs: | |
updateChangelog: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: npm ci | |
- 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 }}" # Use the PR title as the release version (lowercased, e.g. v1.0.0) | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
if: startsWith(github.head_ref, 'release/') && github.base_ref == 'main' | |
- name: Commit and Push Changes | |
run: | | |
git push origin ${{ github.head_ref }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
if: startsWith(github.head_ref, 'release/') && github.base_ref == 'main' |