a8910e5491
Automated package publish had gotten broken because we lost all our git tags/releases. We fixed that, but also: * made releases come from huppy instead of david * swtiched from node's `execSync` to our `exec` for more debuggable output * cleaned up some of the scripts a little this diff has a lot of whitespace changes so you're best off reviewing it with whitespace changes hidden: https://github.com/tldraw/tldraw/pull/1338/files?diff=split&w=1
51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
name: Publish new version of public packages
|
|
# This bumps the version, updates the changelogs, publishes a GitHub release, and publishes the packages to npm.
|
|
|
|
# Package publishing is manually triggered on github actions dashboard
|
|
on: workflow_dispatch
|
|
|
|
env:
|
|
YARN_RC_FILENAME: .yarnrc-private.yml
|
|
|
|
jobs:
|
|
deploy:
|
|
name: 'Publish new version of public packages'
|
|
environment: npm deploy
|
|
timeout-minutes: 15
|
|
runs-on: ubuntu-latest-16-cores-open
|
|
|
|
steps:
|
|
- name: tldraw-repo-sync token
|
|
id: tldraw-repo-sync
|
|
uses: getsentry/action-github-app-token@v2
|
|
with:
|
|
app_id: ${{ secrets.HUPPY_APP_ID }}
|
|
private_key: ${{ secrets.HUPPY_APP_PRIVATE_KEY }}
|
|
|
|
- name: Check out code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
token: ${{ github.token }}
|
|
|
|
- name: Prepare repository
|
|
# Fetch full git history and tags for auto
|
|
run: git fetch --unshallow --tags
|
|
|
|
- name: Setup Node.js environment
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
cache: 'yarn'
|
|
cache-dependency-path: 'public-yarn.lock'
|
|
|
|
- name: Enable corepack
|
|
run: corepack enable
|
|
|
|
- name: Install dependencies
|
|
run: yarn
|
|
|
|
- name: Publish
|
|
run: yarn tsx ./scripts/publish-new.ts
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|