[CI] Update sha retrieval (#1352)
This commit is contained in:
1 parent
818a091e14
commit
448b1445d3
1 file changed
+8
-7
@@ -7,20 +7,23 @@ jobs:
|
|||||||
name: Build and upload Assets to Release
|
name: Build and upload Assets to Release
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- uses: benjlevesque/short-sha@v2.1
|
||||||
|
id: short-sha
|
||||||
|
with:
|
||||||
|
length: 6
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.7"
|
python-version: "3.7"
|
||||||
- name: Set outputs
|
|
||||||
id: vars
|
|
||||||
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install platformio requests shutils
|
pip install platformio requests shutils
|
||||||
npm install
|
npm install
|
||||||
- name: Set soft version tag from git
|
- name: Set sha tag
|
||||||
run: sed -i "s/version_tag/${steps.vars.outputs.sha_short}/g" main/User_config.h
|
run: |
|
||||||
|
sed -i "s/version_tag/${{ steps.short-sha.outputs.sha }}/g" main/User_config.h
|
||||||
|
sed -i "s/version_tag/${{ steps.short-sha.outputs.sha }}/g" docs/.vuepress/config.js
|
||||||
- name: Run PlatformIO
|
- name: Run PlatformIO
|
||||||
run: platformio run
|
run: platformio run
|
||||||
- name: Prepare Release Assets
|
- name: Prepare Release Assets
|
||||||
@@ -31,8 +34,6 @@ jobs:
|
|||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: "14.x"
|
node-version: "14.x"
|
||||||
- name: Set doc version tag from git
|
|
||||||
run: sed -i "s/version_tag/${{steps.vars.outputs.sha_short}}/g" docs/.vuepress/config.js
|
|
||||||
- name: Build documentation
|
- name: Build documentation
|
||||||
run: |
|
run: |
|
||||||
python ./scripts/gen_wu_dev.py
|
python ./scripts/gen_wu_dev.py
|
||||||
|
|||||||
Reference in new issue
Block a user