mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-09-18 01:25:54 +00:00
Update publish_npm.yaml and add commit as version
Signed-off-by: 李旭海 <lxh_shine@hotmail.com>
This commit is contained in:
parent
96c1222c3e
commit
9f0aecb6ee
5
.github/workflows/publish_npm.yaml
vendored
5
.github/workflows/publish_npm.yaml
vendored
@ -21,10 +21,13 @@ jobs:
|
||||
- name: Get version
|
||||
id: get_version
|
||||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
||||
- name: Get commit id
|
||||
id: get_commit_id
|
||||
run: echo ::set-output name=COMMIT_ID::$(git rev-parse --short "$GITHUB_SHA")
|
||||
- name: Set version
|
||||
run: |
|
||||
sudo apt-get install jq
|
||||
jq '.version="${{ steps.get_version.outputs.VERSION }}"' package.json > package.json.new
|
||||
jq '.version="${{ steps.get_version.outputs.VERSION }}-${{ steps.get_version.outputs.COMMIT_ID }}"' package.json > package.json.new
|
||||
mv package.json.new package.json
|
||||
- name: Generate SDK
|
||||
run: |
|
||||
|
Loading…
x
Reference in New Issue
Block a user