Merge pull request #852 from shufo/fix/unbalanced-x-slot-tag #547
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
on: | |
push: | |
branches: | |
- main | |
name: create-release | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: GoogleCloudPlatform/release-please-action@v3 | |
id: release | |
with: | |
release-type: node | |
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Fixes","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false}]' | |
- uses: actions/checkout@v3 | |
if: ${{ steps.release.outputs.release_created }} | |
- name: Set up Node.js | |
if: ${{ steps.release.outputs.release_created }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 14.x | |
registry-url: 'https://registry.npmjs.org' | |
- name: Get yarn cache directory path | |
if: ${{ steps.release.outputs.release_created }} | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v3 | |
if: ${{ steps.release.outputs.release_created }} | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- run: yarn install | |
if: ${{ steps.release.outputs.release_created }} | |
- run: yarn run build | |
if: ${{ steps.release.outputs.release_created }} | |
- name: publish to npm | |
if: ${{ steps.release.outputs.release_created }} | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} | |
run: | | |
yarn publish --non-interactive --new-version ${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} |