Skip to content

Merge pull request #383 from samternent/changeset-release/main #4

Merge pull request #383 from samternent/changeset-release/main

Merge pull request #383 from samternent/changeset-release/main #4

name: Production Tag Deployment
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
PNPM_CACHE_PATH: ~/.pnpm-store
PNPM_CACHE_NAME: pnpm-store-cache
on:
push:
tags:
- "ternent-ui-*.*.*"
jobs:
Deploy-Production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout repo
uses: actions/checkout@master
with:
fetch-depth: 0
persist-credentials: false
- name: Get branch name
id: branch
run: |
echo "branch_name=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
- name: Get node version
id: nvmrc
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node
uses: actions/setup-node@v3
with:
always-auth: true
node-version-file: ".nvmrc"
registry-url: https://registry.npmjs.org
cache: "pnpm"
- name: Set publishing config
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
env:
NODE_AUTH_TOKEN: ${{env.NPM_TOKEN}}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm --filter ternent-ui build
- name: Publish npm
run: pnpm --filter ternent-ui publish --no-git-checks --access public
env:
NPM_TOKEN: ${{ env.NPM_TOKEN }}