Publish NT CSS Framework #81
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
name: 'Publish NT CSS Framework' | |
on: | |
release: | |
branches: | |
- main | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Authenticate with npm | |
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_ACCESS_TOKEN }}" > ~/.npmrc | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- name: Set up PNPM_HOME and PATH | |
run: | | |
echo "PNPM_HOME=$HOME/.local/share/pnpm" >> $GITHUB_ENV | |
echo "PATH=$HOME/.local/share/pnpm:$PATH" >> $GITHUB_ENV | |
mkdir -p $HOME/.local/share/pnpm | |
export PNPM_HOME=$HOME/.local/share/pnpm | |
export PATH=$PNPM_HOME:$PATH | |
- name: Install dependencies | |
run: pnpm install | |
working-directory: apps/nt-stylesheet | |
- name: Test CSS framework | |
run: pnpm run test | |
working-directory: apps/nt-stylesheet | |
- name: Build CSS framework | |
run: pnpm run build | |
working-directory: apps/nt-stylesheet | |
- name: Publish to npm | |
run: pnpm publish --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} | |
working-directory: apps/nt-stylesheet |