Skip to content

dev

dev #282

Workflow file for this run

name: Publish Package
on:
workflow_dispatch:
push:
tags:
- 'v*'
paths-ignore:
- '_docs/**'
- '*.md'
- '*.editorconfig'
- '*.gitignore'
jobs:
build-and-publish:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: [ 14.x ]
os: [ ubuntu-latest ]
steps:
- name: Checkout
uses: actions/checkout@v1
- id: prep
uses: hocgin/action-env@main
- name: Git Identity
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Authenticate with Registry
run: |
echo "@apollo-elements:registry=https://registry.npmjs.org/" > .npmrc
echo "registry=https://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
npm whoami
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Rename Version
run: |
sed -i "s/\"4.0.45\"/\"${VERSION}\"/" package.json
env:
VERSION: ${{ steps.prep.outputs.version_number }}
- name: Publish Package
run: |
pnpm install --no-frozen-lockfile
pnpm patchpackage
pnpm run release
env:
NODE_OPTIONS: '--max_old_space_size=4096 --experimental-worker'
USE_LOG: false