mirror of
https://github.com/selfxyz/self.git
synced 2026-02-19 02:24:25 -05:00
chore: enhance npm publish workflow to include version tagging
- Updated the npm publish workflow to dynamically determine the package version and apply a beta tag for pre-release versions. - This change ensures that the correct versioning is maintained during the publishing process, improving clarity for users regarding package stability. - Retained existing dry run functionality for testing without actual publishing.
This commit is contained in:
20
.github/workflows/npm-publish.yml
vendored
20
.github/workflows/npm-publish.yml
vendored
@@ -98,7 +98,9 @@ jobs:
|
||||
id: publish
|
||||
run: |
|
||||
DRY_RUN="${{ github.event.inputs.dry_run == 'true' && '--dry-run' || '' }}"
|
||||
npx npm@latest publish --access public $DRY_RUN
|
||||
VERSION=$(node -p "require('./package.json').version")
|
||||
TAG=$([[ "$VERSION" == *-* ]] && echo "--tag beta" || echo "")
|
||||
npx npm@latest publish --access public $TAG $DRY_RUN
|
||||
|
||||
- name: Publish result
|
||||
if: always()
|
||||
@@ -136,7 +138,9 @@ jobs:
|
||||
id: publish
|
||||
run: |
|
||||
DRY_RUN="${{ github.event.inputs.dry_run == 'true' && '--dry-run' || '' }}"
|
||||
npx npm@latest publish --access public $DRY_RUN
|
||||
VERSION=$(node -p "require('./package.json').version")
|
||||
TAG=$([[ "$VERSION" == *-* ]] && echo "--tag beta" || echo "")
|
||||
npx npm@latest publish --access public $TAG $DRY_RUN
|
||||
|
||||
- name: Publish result
|
||||
if: always()
|
||||
@@ -172,7 +176,9 @@ jobs:
|
||||
id: publish
|
||||
run: |
|
||||
DRY_RUN="${{ github.event.inputs.dry_run == 'true' && '--dry-run' || '' }}"
|
||||
npx npm@latest publish --access public $DRY_RUN
|
||||
VERSION=$(node -p "require('./package.json').version")
|
||||
TAG=$([[ "$VERSION" == *-* ]] && echo "--tag beta" || echo "")
|
||||
npx npm@latest publish --access public $TAG $DRY_RUN
|
||||
|
||||
- name: Publish result
|
||||
if: always()
|
||||
@@ -205,7 +211,9 @@ jobs:
|
||||
id: publish
|
||||
run: |
|
||||
DRY_RUN="${{ github.event.inputs.dry_run == 'true' && '--dry-run' || '' }}"
|
||||
npx npm@latest publish --access public $DRY_RUN
|
||||
VERSION=$(node -p "require('./package.json').version")
|
||||
TAG=$([[ "$VERSION" == *-* ]] && echo "--tag beta" || echo "")
|
||||
npx npm@latest publish --access public $TAG $DRY_RUN
|
||||
|
||||
- name: Publish result
|
||||
if: always()
|
||||
@@ -241,7 +249,9 @@ jobs:
|
||||
id: publish
|
||||
run: |
|
||||
DRY_RUN="${{ github.event.inputs.dry_run == 'true' && '--dry-run' || '' }}"
|
||||
npx npm@latest publish --access public $DRY_RUN
|
||||
VERSION=$(node -p "require('./package.json').version")
|
||||
TAG=$([[ "$VERSION" == *-* ]] && echo "--tag beta" || echo "")
|
||||
npx npm@latest publish --access public $TAG $DRY_RUN
|
||||
|
||||
- name: Publish result
|
||||
if: always()
|
||||
|
||||
Reference in New Issue
Block a user