v1.35.1 #30
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | |
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages | |
# _Using the default `github.token` (or `secrets.GITHUB_TOKEN`), | |
# [will not trigger](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token) | |
# another workflow, which depends on the [`release`](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#release) event. i.e._ | |
# | |
# ```yaml | |
# on: | |
# release: | |
# types: | |
# - published | |
# ... | |
# ``` | |
# If you want to make use of another workflow | |
# which depends on the release event that may be triggered by using this action, | |
# you will have to supply a personal access token secret for the `GITHUB_TOKEN` environment variable. | |
# For more information on creating a Personal Access Token, | |
# see the [docs](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token)._ | |
name: UI - Publish to NPM | |
on: | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build utils | |
run: pnpm --filter ./packages/utils run build | |
- name: Build icons | |
run: pnpm --filter ./packages/icons run build | |
- name: Build UI Syntax | |
run: pnpm --filter ./packages/ui-syntax run build | |
- name: Run tests | |
run: pnpm test | |
publish-npm: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
registry-url: https://registry.npmjs.org/ | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build utils | |
run: pnpm --filter ./packages/utils run build | |
# - name: Build UI Component Library | |
# run: pnpm --filter ./packages/ui run build | |
# Build step is in prepublish script in package.json | |
- name: Publish package on NPM | |
run: pnpm publish packages/ui --access public --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_PUBLISH_TOKEN }} |