fix: incorrect denylist logic for redirects #6623
Workflow file for this run
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
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, 'template-resolver@') | |
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: 🧪 Build CJS and test | |
run: pnpm --filter=${{ env.PACKAGE_NAME }} compile:cjs | |
- 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 | |
node scripts/preparePackageJson.cjs $VERSION | |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc | |
npm publish --access public |