File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 44 pull_request :
55 branches : ["main"]
66
7+ env :
8+ APP_VERSION : " " # Define a default value for global accessibility
9+
710jobs :
811 check-version :
912 runs-on : ubuntu-latest
2528 - name : Check version in ver.py
2629 id : check-version
2730 run : |
28- CURRENT_VERSION=$(cat ver.py | grep -o "'.*'")
31+ CURRENT_VERSION=$(cat ver.py | grep -o "'.*'" | tr -d "'" )
2932 echo "Current version is $CURRENT_VERSION"
3033
3134 if [ "$CURRENT_VERSION" == "$LATEST_TAG" ]; then
3538 else
3639 echo "Current version $CURRENT_VERSION differs from latest tag $LATEST_TAG. Build will continue."
3740 echo "::set-output name=should-run::true"
41+ echo "APP_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
3842 fi
39- echo "APP_VERSION=$CURRENT_VERSION" >> $GITHUB_OUTPUT
43+
4044 build :
4145 needs : check-version
4246 if : needs.check-version.outputs.should-run == 'true'
@@ -107,7 +111,7 @@ jobs:
107111 - name : Save build artifacts
108112 uses : actions/upload-artifact@v3
109113 with :
110- name : ${{ matrix.name }}-build-${{ github.event.pull_request.number }}-${{ github.sha }}
114+ name : ${{ matrix.name }}-build-${{ env.APP_VERSION }}-${{ github.event.pull_request.number }}-${{ github.sha }}
111115 path : dist/*
112116
113117 collect-artifacts :
You can’t perform that action at this time.
0 commit comments