From 2cf97a3f49327f73cbc931d308d27fc0b88a540e Mon Sep 17 00:00:00 2001 From: Adam Matthiesen Date: Tue, 13 Feb 2024 02:23:09 -0800 Subject: [PATCH] add new workflow so i can publish npm packages quickly --- .../npm-astro-ghostcms-rendercontent.yml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/npm-astro-ghostcms-rendercontent.yml 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}}