Merge pull request #164 from kenchan0130/dependabot/npm_and_yarn/rimr… #115
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: Package | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
env: | |
node-version: 20 | |
jobs: | |
Package: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "${{ env.node-version }}" | |
cache: npm | |
- name: Install Node.js dependencies | |
run: | | |
npm ci | |
- name: Run package | |
run: | | |
npm run package | |
- name: Push package | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "kenchan0130" | |
git remote set-url origin https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} | |
git add -N . | |
if git diff --exit-code --quiet;then | |
echo "No change." | |
else | |
git add . | |
git commit -m "[skip ci] Create package by ${GITHUB_SHA}" | |
git push origin master | |
fi |