8520c74116
This commit creates `x.x.x-insiders.COMMIT_HASH` builds of all of our public packages, and publishes them to npm with the `insiders` tag, so one could say `npm install @theatre/core@0.4.8-insiders.bsdf387` and use the package at that particular commit. Co-authored-by: Aria Minaei <aria.minaei@gmail.com>
34 lines
1.2 KiB
YAML
34 lines
1.2 KiB
YAML
name: 'Publish Prerelease'
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '16.x'
|
|
- name: Get yarn cache directory path
|
|
id: yarn-cache-dir-path
|
|
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
|
|
- uses: actions/cache@v2
|
|
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
with:
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-yarn-
|
|
- run: yarn install
|
|
- name: Build the theatre packages
|
|
run: yarn build
|
|
- name: Update .yarnrc.yml with the auth config for the npmPublishRegistry
|
|
run: cat .github/.yarnrc.publish.yml >> .yarnrc.yml
|
|
- name: Publish the theatre packages
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
# LATEST_COMMIT_HASH: ${{ github.event.pull_request.head.sha }}
|
|
run: yarn zx scripts/prerelease.mjs
|