.github/workflows/release.yml
name: Release packages
on:
push:
branches:
- main
- beta
- alpha
defaults:
run:
shell: sh
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: "16"
cache: "yarn"
- name: Install packages
run: yarn install
- name: Build
run: yarn build
- name: Wait on tests
uses: lewagon/wait-on-check-action@v1.3.1
with:
ref: ${{ github.ref }}
running-workflow-name: "Release"
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
- name: Publish
run: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}