Skip to content

Release

Release #52

Workflow file for this run

name: Release
on: [workflow_dispatch]
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
# setting this should create the npmrc with $NODE_AUTH_TOKEN
registry-url: 'https://registry.npmjs.org'
- name: Config git user
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git remote set-url origin https://${{ github.actor }}:${{ secrets.GH_NODE_TOKEN }}@github.com/${{ github.repository }}
- name: Bootstrap lerna
run: yarn
- name: Lerna build
run: yarn build
- name: Bump release
if: github.ref == 'refs/heads/main'
run: yarn version:release
env:
GH_TOKEN: ${{ secrets.GH_NODE_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Bump prerelease
if: github.ref != 'refs/heads/main'
run: yarn version:prerelease
env:
GH_TOKEN: ${{ secrets.GH_NODE_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Publish packages
run: yarn publish:ci
env:
GH_TOKEN: ${{ secrets.GH_NODE_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: merge main -> next
uses: actions/setup-node@v3
with:
type: now
from_branch: main
target_branch: next
github_token: ${{ secrets.GH_NODE_TOKEN }}