Automatically publish prereleases to npm (#155)
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>
This commit is contained in:
parent
3d10325873
commit
8520c74116
5 changed files with 196 additions and 3 deletions
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
@ -7,7 +7,7 @@ on:
|
|||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
Test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
|
|
34
.github/workflows/publish-prerelease.yml
vendored
Normal file
34
.github/workflows/publish-prerelease.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue