Create Astro-GhostCMS-Theme-Default.yml
This commit is contained in:
parent
a5d0909c10
commit
956f0f3923
|
@ -0,0 +1,52 @@
|
||||||
|
name: Publish Astro-GhostCMS Theme (Default)
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publishnpm:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ./packages/astro-ghostcms-theme-default
|
||||||
|
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
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||||
|
|
||||||
|
githubpackage:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ./packages/astro-ghostcms-theme-default
|
||||||
|
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
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{secrets.ACTION_TOKEN}}
|
Loading…
Reference in New Issue