Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Merge pull request #731 from appsmithorg/pt-font-change #302

Merge pull request #731 from appsmithorg/pt-font-change

Merge pull request #731 from appsmithorg/pt-font-change #302

Workflow file for this run

name: NPM Publish Release Workflow
on:
push:
paths:
- "packages/**"
branches:
- "release"
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
# Get yarn cache directory and set it in a variable
- name: Get yarn cache path
id: yarn-cache-path
run: echo "::set-output name=dir::$(yarn cache dir)"
# Checkout branch or head commit
- name: Checkout branch
uses: actions/checkout@v3
with:
fetch-depth: 0
# Set up node version
- name: Setup Node js version
uses: actions/setup-node@v2
with:
node-version: 16.x
# Load yarn cache
- name: Load Yarn cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
# Install the dependencies
- name: Install dependencies
run: yarn install --frozen-lockfile
# Set git config -> changelog
- name: Set git config to github-actions
run: |
git config user.name github-actions
git config user.email [email protected]
# Configure npm
- name: Configure npm
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.APPSMITH_NPM_PUBLISH_KEY }}
# Build packages, add packages build script inside workspace scripts.build
- name: Build packages
run: yarn build
# Release beta
- name: Release to @beta tag
if: steps.changesets.outputs.published != 'true'
run: |
yarn changeset version --snapshot beta
yarn changeset publish --tag beta
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}