Skip to content

Merge pull request #84 from farm-fe/feat-wasm #14

Merge pull request #84 from farm-fe/feat-wasm

Merge pull request #84 from farm-fe/feat-wasm #14

name: Release Packages
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, 'js-plugins') || contains(github.event.head_commit.message, 'all')
name: release
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 2
# - run: |
# git fetch --no-tags --prune --depth=1 origin +refs/heads/main:refs/remotes/HEAD~1
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Enable Corepack
id: pnpm-setup
run: |
corepack enable
- name: Initliaze .npmrc
run: >
echo -e "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}\n$(cat .npmrc)" > .npmrc
&& cat -n .npmrc
- name: pnpm install
run: pnpm install --frozen-lockfile
- name: Build Packages
run: |
pnpm --filter "{js-plugins}[HEAD~1]" build
- name: Release and Publish Packages
run: |
npm set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} && npm config set access public && pnpm --filter "{js-plugins}[HEAD~1]" publish --no-git-checks