Skip to content

fix: set git identity in release workflow for annotated tags #30

fix: set git identity in release workflow for annotated tags

fix: set git identity in release workflow for annotated tags #30

Workflow file for this run

name: build
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24.x"
- name: Install Yarn
run: npm install -g yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v5
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Deps
run: yarn install --pure-lockfile
- name: Build
run: yarn build
- name: Commit dist/ changes
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
git add dist/
if git diff --cached --quiet; then
echo "dist/ is up to date, nothing to commit"
else
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit -m "chore: update dist/ build artifacts"
git push
fi