mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-11-07 07:09:46 +00:00
Update publish_npm.yaml
Signed-off-by: zhanghengxin <812718649@qq.com>
This commit is contained in:
parent
c931190c90
commit
4a6fcb04ec
6
.github/workflows/publish_npm.yaml
vendored
6
.github/workflows/publish_npm.yaml
vendored
@ -18,6 +18,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 16
|
||||||
registry-url: https://registry.npmjs.org/
|
registry-url: https://registry.npmjs.org/
|
||||||
|
|
||||||
|
- run: git describe --abbrev=0
|
||||||
- name: Get version
|
- name: Get version
|
||||||
id: get_version
|
id: get_version
|
||||||
run: echo "VERSION=$( git describe --abbrev=0 )" >> $GITHUB_OUTPUT
|
run: echo "VERSION=$( git describe --abbrev=0 )" >> $GITHUB_OUTPUT
|
||||||
@ -25,11 +27,11 @@ jobs:
|
|||||||
id: get_commit_id
|
id: get_commit_id
|
||||||
run: echo "COMMIT_ID=$( git rev-parse --short "$GITHUB_SHA" )" >> $GITHUB_OUTPUT
|
run: echo "COMMIT_ID=$( git rev-parse --short "$GITHUB_SHA" )" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- run: $(echo "${{ steps.get_version.outputs.VERSION }}-${{ steps.get_version.outputs.COMMIT_ID }}")
|
- run: $(echo "${{ steps.get_version.outputs.VERSION }}-${{ steps.get_commit_id.outputs.COMMIT_ID }}")
|
||||||
- name: Set version
|
- name: Set version
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install jq
|
sudo apt-get install jq
|
||||||
jq '.version="${{ steps.get_version.outputs.VERSION }}-${{ steps.get_version.outputs.COMMIT_ID }}"' package.json > package.json.new
|
jq '.version="${{ steps.get_version.outputs.VERSION }}-${{ steps.get_commit_id.outputs.COMMIT_ID }}"' package.json > package.json.new
|
||||||
mv package.json.new package.json
|
mv package.json.new package.json
|
||||||
- name: Generate SDK
|
- name: Generate SDK
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user