diff --git a/.github/workflows/npm-astro-ghostcms-rendercontent.yml b/.github/workflows/npm-astro-ghostcms-rendercontent.yml new file mode 100644 index 00000000..bc75a232 --- /dev/null +++ b/.github/workflows/npm-astro-ghostcms-rendercontent.yml @@ -0,0 +1,52 @@ +name: Publish Content Render Util + +on: + workflow_dispatch: + +jobs: + publishnpm: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./packages/astro-ghostcms-rendercontent + steps: + - name: checkout + uses: actions/checkout@v4 + - name: node + uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + - name: publish-npm + run: | + # Change publish registry + echo "$(jq '.publishConfig.registry = "https://registry.npmjs.org"' package.json)" > package.json + # Publish package + npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + + githubpackage: + permissions: + contents: read + packages: write + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./packages/astro-ghostcms-rendercontent + steps: + - name: checkout + uses: actions/checkout@v4 + - name: node + uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: https://npm.pkg.github.com + - name: publish-github + run: | + # Change publish registry + echo "$(jq '.publishConfig.registry = "https://npm.pkg.github.com"' package.json)" > package.json + # Publish package + npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.ACTION_TOKEN}}