2023-04-21 16:06:21 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
name: 'Publish new version of public packages'
|
|
|
|
environment: npm deploy
|
|
|
|
timeout-minutes: 15
|
2023-04-21 16:18:25 +00:00
|
|
|
runs-on: ubuntu-latest-16-cores-open
|
2023-04-21 16:06:21 +00:00
|
|
|
|
|
|
|
steps:
|
2023-06-30 16:00:04 +00:00
|
|
|
- name: Generate GH token
|
|
|
|
id: generate_token
|
|
|
|
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
2023-05-09 13:25:56 +00:00
|
|
|
with:
|
|
|
|
app_id: ${{ secrets.HUPPY_APP_ID }}
|
|
|
|
private_key: ${{ secrets.HUPPY_APP_PRIVATE_KEY }}
|
|
|
|
|
2023-04-21 16:06:21 +00:00
|
|
|
- name: Check out code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
2023-06-30 16:00:04 +00:00
|
|
|
token: ${{ steps.generate_token.outputs.token }}
|
2023-04-21 16:06:21 +00:00
|
|
|
|
|
|
|
- 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:
|
2023-12-12 11:36:52 +00:00
|
|
|
node-version: 18.18.2
|
2023-04-21 16:06:21 +00:00
|
|
|
cache: 'yarn'
|
|
|
|
|
|
|
|
- name: Enable corepack
|
|
|
|
run: corepack enable
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn
|
|
|
|
|
|
|
|
- name: Publish
|
2023-06-30 16:00:04 +00:00
|
|
|
run: |
|
|
|
|
git config --global user.name 'huppy-bot[bot]'
|
|
|
|
git config --global user.email '128400622+huppy-bot[bot]@users.noreply.github.com'
|
|
|
|
yarn tsx ./scripts/publish-new.ts
|
2023-04-21 16:06:21 +00:00
|
|
|
env:
|
2023-06-30 16:00:04 +00:00
|
|
|
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
|
2023-04-21 16:06:21 +00:00
|
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
2023-05-15 13:17:19 +00:00
|
|
|
HUPPY_TOKEN: ${{ secrets.HUPPY_TOKEN }}
|