Skip to content

Commit

Permalink
chore(parsers): setup publishing ci task (#2006)
Browse files Browse the repository at this point in the history
dsinghvi authored Jan 14, 2025
1 parent 3eebf4c commit 4cf0cab
Showing 2 changed files with 45 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/publish-parsers-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish Parsers Package

on:
push:
branches:
- main
paths:
- 'packages/parsers/package.json'

jobs:
check-and-publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2 # This helps turbo resolve changes faster

- name: Install
uses: ./.github/actions/install

- name: Check package.json changes
id: check-version
run: |
CHANGED=$(git diff HEAD^ HEAD -- packages/parsers/package.json | grep '"version":' || true)
if [ ! -z "$CHANGED" ]; then
echo "version_changed=true" >> $GITHUB_OUTPUT
else
echo "version_changed=false" >> $GITHUB_OUTPUT
fi
- name: Install dependencies
if: steps.check-version.outputs.version_changed == 'true'
run: pnpm install

- name: Compile package
if: steps.check-version.outputs.version_changed == 'true'
run: cd packages/parsers && pnpm compile

- name: Publish to npm
if: steps.check-version.outputs.version_changed == 'true'
run: cd packages/parsers && pnpm publish --no-git-checks --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.FERN_NPM_TOKEN }}
2 changes: 1 addition & 1 deletion packages/parsers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fern-api/docs-parsers",
"version": "0.0.30",
"version": "0.0.31",
"repository": {
"type": "git",
"url": "https://github.com/fern-api/fern-platform.git",

0 comments on commit 4cf0cab

Please sign in to comment.