2020-09-03 19:03:04 +09:00
|
|
|
name: publish
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [master]
|
|
|
|
jobs:
|
|
|
|
main:
|
2023-08-09 14:00:16 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2020-09-03 19:03:04 +09:00
|
|
|
steps:
|
2023-10-19 13:55:31 +00:00
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
2020-09-03 19:03:04 +09:00
|
|
|
- id: yarn_cache
|
|
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
2024-01-18 03:43:30 +09:00
|
|
|
- uses: actions/cache@v4
|
2020-09-03 19:03:04 +09:00
|
|
|
with:
|
|
|
|
path: ${{ steps.yarn_cache.outputs.dir }}
|
|
|
|
key: yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
restore-keys: yarn-
|
|
|
|
- run: yarn
|
|
|
|
- name: Git configuration.
|
|
|
|
run: |
|
|
|
|
git config --global user.email bot@example
|
|
|
|
git config --global user.name bot
|
2020-09-03 19:32:36 +09:00
|
|
|
- name: Publish.
|
|
|
|
run: |
|
2021-02-06 17:40:12 +09:00
|
|
|
npm version patch
|
|
|
|
git push --atomic --tags origin HEAD
|
2020-09-03 19:32:36 +09:00
|
|
|
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
|
|
|
|
npm publish
|