Skip to content

release-triggered

release-triggered #23

Workflow file for this run

name: Publish and release
on:
repository_dispatch:
types:
- release-triggered
jobs:
release-major:
if: ${{ github.event.client_payload.release_type == 'major' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: fregante/setup-git-user@v1
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: yarn build
- id: prepare
run: yarn run release-major
- id: publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTOMATION_TOKEN}}
release-minor:
if: ${{ github.event.client_payload.release_type == 'minor' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: fregante/setup-git-user@v1
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: yarn build
- id: prepare
run: yarn run release-minor
- id: publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTOMATION_TOKEN}}
release-patch:
if: ${{ github.event.client_payload.release_type == 'patch' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: fregante/setup-git-user@v1
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: yarn build
- id: prepare
run: yarn run release-patch
- id: publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTOMATION_TOKEN}}