-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: move template resolver to it's own package (#700)
- Loading branch information
1 parent
48c76ed
commit 4d3c30d
Showing
210 changed files
with
2,319 additions
and
386 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Publish Template Resolver Package | ||
|
||
on: | ||
push: {} | ||
release: | ||
types: | ||
- published | ||
|
||
env: | ||
PACKAGE_NAME: "@fern-api/template-resolver" | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_TEAM: "buildwithfern" | ||
FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.FERN_GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.FERN_NPM_TOKEN }} | ||
|
||
jobs: | ||
publish_package: | ||
if: github.event_name == 'release' && startsWith(github.event.release.tag_name, 'python@') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: 📥 Install | ||
uses: ./.github/actions/install | ||
|
||
- name: 🧪 Build and test | ||
run: pnpm turbo codegen build test --filter=${{ env.PACKAGE_NAME }} | ||
|
||
- name: Publish Template Resolver Package | ||
env: | ||
NPM_TOKEN: ${{ secrets.FERN_NPM_TOKEN }} | ||
# Currently follows the same version as FDR, which is probably fine for now | ||
run: | | ||
tag=${{ github.event.release.tag_name }} | ||
prefix="template-resolver@" | ||
VERSION="${tag#$prefix}" | ||
cd packages/template-resolver | ||
mv package.json package.json.tmp | ||
version_replace="s/0.0.0/${VERSION}/" | ||
cat package.json.tmp| sed "${version_replace}" > package.json | ||
rm -rf package.json.tmp | ||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc | ||
npm publish --access public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
imports: | ||
commons: commons.yml | ||
snippets: __package__.yml | ||
snippets: snippets.yml | ||
|
||
service: | ||
auth: true | ||
|
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
fern/apis/fdr/definition/template.yml → fern/apis/fdr/definition/templates.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
imports: | ||
commons: commons.yml | ||
snippets: __package__.yml | ||
snippets: snippets.yml | ||
|
||
service: | ||
auth: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
export * from "./types"; | ||
export * from "./resources"; | ||
export * from "./client"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.