Skip to content

Merge pull request #283 from abeyuya/renovate/eslint-8.x #214

Merge pull request #283 from abeyuya/renovate/eslint-8.x

Merge pull request #283 from abeyuya/renovate/eslint-8.x #214

name: Release latest tag
on:
push:
branches:
- master
jobs:
push-latest-tag:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Checkout release
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git checkout release
git merge origin/master --no-commit --no-ff
- name: Cache npm
uses: actions/cache@v3
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 \
"https://${{ github.actor }}:${{ secrets.MY_GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" \
HEAD:release \
-f \
--tags