Skip to content

Merge pull request #1 from chatwork/update_node20 #1

Merge pull request #1 from chatwork/update_node20

Merge pull request #1 from chatwork/update_node20 #1

name: Release latest tag
on:
push:
branches:
- main
jobs:
push-latest-tag:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Checkout release
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git checkout release
git merge origin/main --no-commit --no-ff
- name: Cache npm
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Build
run: |
npm install
npm run build
- name: Commit
run: |
git add dist -f
git diff-index --quiet HEAD || (git commit -m"update build ${{ github.run_number }}" && git tag latest -f)
- name: Push changes
run: |
git push origin release -f --tags