Skip to content

feat(examples): add react 18 example app #6

feat(examples): add react 18 example app

feat(examples): add react 18 example app #6

on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
name: Run Release Please
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
release_tag_name: ${{ steps.release.outputs.release_tag_name }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
token: ${{secrets.GITHUB_TOKEN}}
default-branch: main
monorepo-tags: true
Build-And-Publish:
environment: deployment
runs-on: ubuntu-latest
needs: [release-please]
if: ${{ needs.release-please.outputs.releases_created }}
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ needs.release-please.outputs.release_tag_name }}
- id: setup-environment
uses: ./.github/actions/setup
with:
node-version: ${{ matrix.node-version }}
- run: yarn build
- name: Publish to NPM
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
run: |
echo "@spotify-confidence:registry=https://registry.npmjs.org/" > .npmrc
echo "registry=https://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> .npmrc
yarn publish-if-missing