Merge pull request #165 from kenchan0130/dependabot/npm_and_yarn/wind… #116
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 |