updated publish steps
This commit is contained in:
26
.github/workflows/build.yaml
vendored
26
.github/workflows/build.yaml
vendored
@ -46,8 +46,24 @@ jobs:
|
|||||||
docs:
|
docs:
|
||||||
name: Publish CDN & Docs
|
name: Publish CDN & Docs
|
||||||
needs: build
|
needs: build
|
||||||
uses: ztimson/actions/.github/workflows/docker.yaml@develop
|
runs-on: ubuntu-latest
|
||||||
with:
|
container:
|
||||||
name: ztimson/node-utils
|
image: node:22
|
||||||
repository: ${{github.server_url}}/${{github.repository}}.git
|
volumes:
|
||||||
pass: ${{secrets.DEPLOY_TOKEN}}
|
- /tmp/gitea:/tmp/gitea
|
||||||
|
steps:
|
||||||
|
- name: Publish Library
|
||||||
|
run: |
|
||||||
|
if [ "${{github.ref_name}}" = "master" ]; then
|
||||||
|
cd lib
|
||||||
|
|
||||||
|
REGISTRY="${{github.server_url}}/api/packages/${{github.repository_owner}}/npm/"
|
||||||
|
npm set registry "$REGISTRY"
|
||||||
|
npm set $(echo $REGISTRY | sed s%http:%% | sed s%https:%% ):_authToken "${{secrets.DEPLOY_TOKEN}}"
|
||||||
|
npm publish || echo "Failed to publish"
|
||||||
|
|
||||||
|
REGISTRY="https://registry.npmjs.org/"
|
||||||
|
npm set registry "$REGISTRY"
|
||||||
|
npm set $(echo $REGISTRY | sed s%http:%% | sed s%https:%% ):_authToken "${{secrets.NPM_TOKEN}}"
|
||||||
|
npm publish || echo "Failed to publish"
|
||||||
|
fi
|
||||||
|
Reference in New Issue
Block a user