2022-05-18 12:09:45 +02:00
|
|
|
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
|
2022-07-22 17:19:48 +02:00
|
|
|
- name: Build the Theatre.js packages
|
2022-05-18 12:09:45 +02:00
|
|
|
run: yarn build
|
|
|
|
- name: Update .yarnrc.yml with the auth config for the npmPublishRegistry
|
|
|
|
run: cat .github/.yarnrc.publish.yml >> .yarnrc.yml
|
2022-07-22 17:19:48 +02:00
|
|
|
- name: Publish the Theatre.js packages
|
2022-05-18 12:09:45 +02:00
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
# LATEST_COMMIT_HASH: ${{ github.event.pull_request.head.sha }}
|
|
|
|
run: yarn zx scripts/prerelease.mjs
|