Skip to content

Publish Astro-GhostCMS #2

Publish Astro-GhostCMS

Publish Astro-GhostCMS #2

Workflow file for this run

name: Publish Astro-GhostCMS
on:
release:
types: [published]
jobs:
publishnpm:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/astro-ghostcms
steps:
- name: checkout
uses: actions/checkout@v3
- name: node
uses: actions/setup-node@v3
with:
node-version: 18
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
pnpm 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
steps:
- name: checkout
uses: actions/checkout@v3
- name: node
uses: actions/setup-node@v3
with:
node-version: 18
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
pnpm publish
env:
NODE_AUTH_TOKEN: ${{secrets.ACTION_TOKEN}}