Skip to content

fix!: update to correct peer dependencies (#176) #116

fix!: update to correct peer dependencies (#176)

fix!: update to correct peer dependencies (#176) #116

name: Run Release Please
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
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
- name: Trigger Amend Release Workflow
if: ${{ ! steps.release.outputs.releases_created }}
run: |
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/spotify/confidence-sdk-js/dispatches \
-d '{"event_type":"release_amend_trigger", "client_payload": {}}'
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 }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
shell: bash
run: corepack enable && yarn install
- name: Build
shell: bash
run: yarn bundle
- name: Publish to NPM
shell: bash
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
run: |
yarn config set 'npmRegistries["https://registry.npmjs.org"].npmAuthToken' $NPM_TOKEN
yarn publish-if-missing