Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a8353ce

Browse files
adding version change at build time
1 parent ddee10b commit a8353ce

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

‎.DS_Store‎

0 Bytes
Binary file not shown.

‎.github/workflows/main.yml‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,21 @@ jobs:
3939
# Runs a set of commands using the runners shell
4040
- name: Npm build
4141
run: npm run build
42-
42+
43+
# Runs a set of commands using the runners shell
44+
- name: replace version
45+
if: ${{ github.event_name == 'workflow_dispatch' }}
46+
run: |
47+
jq '.version="${{ github.event.inputs.tag }}"' ./dist/LeetcodeSessionManager/manifest.json > ./new_manifest.json
48+
4349
# Runs a set of commands using the runners shell
4450
- name: Zip extension
4551
if: ${{ github.event_name == 'workflow_dispatch' }}
4652
run: |
53+
ls -lrth
4754
mv LICENSE ./dist/LeetcodeSessionManager
55+
mv ./new_manifest.json ./dist/LeetcodeSessionManager/manifest.json
4856
cd ./dist/LeetcodeSessionManager
49-
sed -i '/version/s/[^.]*$/'"${{ github.event.inputs.tag }}\"/" manifest.json
5057
zip -r ../../LeetcodeSessionManager-${{ github.event.inputs.tag }}.zip .
5158
5259
- name: 'Create GitHub Release'

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /