Use reusable publish workflow with explicit versions
This commit is contained in:
1
.github/workflows/dev-release.yml
vendored
1
.github/workflows/dev-release.yml
vendored
@@ -60,5 +60,6 @@ jobs:
|
|||||||
needs: prepare-dev
|
needs: prepare-dev
|
||||||
uses: ./.github/workflows/manual-npm-publish.yml
|
uses: ./.github/workflows/manual-npm-publish.yml
|
||||||
with:
|
with:
|
||||||
|
version: ${{ needs.prepare-dev.outputs.version }}
|
||||||
dist_tag: dev
|
dist_tag: dev
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|||||||
18
.github/workflows/manual-npm-publish.yml
vendored
18
.github/workflows/manual-npm-publish.yml
vendored
@@ -3,6 +3,10 @@ name: Manual NPM Publish
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
|
version:
|
||||||
|
description: "Version to publish (e.g. 0.2.0-dev)"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
dist_tag:
|
dist_tag:
|
||||||
description: "npm dist-tag"
|
description: "npm dist-tag"
|
||||||
required: false
|
required: false
|
||||||
@@ -10,6 +14,9 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
version:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
dist_tag:
|
dist_tag:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
@@ -47,11 +54,18 @@ jobs:
|
|||||||
run: npm run build --workspace @neuralnomads/codenomad
|
run: npm run build --workspace @neuralnomads/codenomad
|
||||||
|
|
||||||
- name: Set publish metadata
|
- name: Set publish metadata
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(node -p "require('./package.json').version")
|
VERSION_INPUT="${{ inputs.version }}"
|
||||||
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
|
if [ -z "$VERSION_INPUT" ]; then
|
||||||
|
VERSION_INPUT=$(node -p "require('./package.json').version")
|
||||||
|
fi
|
||||||
|
echo "VERSION=$VERSION_INPUT" >> "$GITHUB_ENV"
|
||||||
echo "DIST_TAG=${{ inputs.dist_tag || 'dev' }}" >> "$GITHUB_ENV"
|
echo "DIST_TAG=${{ inputs.dist_tag || 'dev' }}" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
- name: Bump package version for publish
|
||||||
|
run: npm version ${VERSION} --workspaces --include-workspace-root --no-git-tag-version --allow-same-version
|
||||||
|
|
||||||
- name: Publish server package with provenance
|
- name: Publish server package with provenance
|
||||||
env:
|
env:
|
||||||
NPM_CONFIG_PROVENANCE: true
|
NPM_CONFIG_PROVENANCE: true
|
||||||
|
|||||||
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@@ -77,5 +77,6 @@ jobs:
|
|||||||
needs: prepare-release
|
needs: prepare-release
|
||||||
uses: ./.github/workflows/manual-npm-publish.yml
|
uses: ./.github/workflows/manual-npm-publish.yml
|
||||||
with:
|
with:
|
||||||
|
version: ${{ needs.prepare-release.outputs.version }}
|
||||||
dist_tag: latest
|
dist_tag: latest
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|||||||
Reference in New Issue
Block a user