54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
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
|
|
npm publish --access public
|
|
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
|
|
npm publish --access public
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{secrets.ACTION_TOKEN}}
|