11on : push
22
3+ defaults :
4+ run :
5+ shell : bash
6+
37jobs :
48 build-pyinstaller :
59 runs-on : ' windows-2022'
@@ -14,17 +18,13 @@ jobs:
1418 cache : ' pip'
1519
1620 - name : Create set_version venv
17- shell : bash
1821 run : python -m venv .venv_set_version
1922 - name : set_version venv install requirements
20- shell : bash
2123 run : .venv_set_version/Scripts/pip install --requirement ./scripts/requirements_version.txt
2224 - name : Set version dev
23- shell : bash
2425 if : ${{ startsWith(github.ref, 'refs/tags/') == false }}
2526 run : .venv_set_version/Scripts/python ./scripts/set_version.py --file OATFWGUI/_version.py dev
2627 - name : Set version release
27- shell : bash
2828 if : ${{ startsWith(github.ref, 'refs/tags/') == true }}
2929 run : .venv_set_version/Scripts/python ./scripts/set_version.py --file OATFWGUI/_version.py release
3030
4040
4141 - name : Retrieve version
4242 id : version
43- shell : bash
4443 run : echo "::set-output name=VERSION::$(./dist/OATFWGUI/OATFWGUI.exe --version)"
4544
4645 - name : Upload artifact
@@ -88,14 +87,11 @@ jobs:
8887 id : version
8988 run : echo "::set-output name=VERSION::$(./dist/OATFWGUI_Linux.sh --version | tail -1)"
9089
91- # Need to tar before upload else file permissions are lost :/
92- - name : Tar files
93- run : tar -cvf dist.tar ./dist
9490 - name : Upload artifact
9591 uses : actions/upload-artifact@v3
9692 with :
9793 name : OATFWGUI_${{ steps.version.outputs.VERSION }}_${{ runner.os }}_${{ runner.arch }}
98- path : dist.tar
94+ path : dist/*
9995
10096 publish-release :
10197 # only publish release on tags
@@ -109,9 +105,20 @@ jobs:
109105 with :
110106 path : artifacts
111107 - run : ls -la artifacts
112- # - name: Publish GitHub release
113- # uses: softprops/action-gh-release@v1
114- # with:
115- # files: |
116- # artifacts/*
117- # LICENSE
108+ - name : Zip artifacts
109+ run : |
110+ set -e
111+ shopt -s nullglob
112+ for dir in artifacts/*/; do
113+ out_zip="$(basename $dir).zip"
114+ echo "Zipping $dir into $out_zip"
115+ zip --recurse-paths "$out_zip" "$dir"
116+ done
117+ - name : Publish GitHub release
118+ uses : softprops/action-gh-release@v1
119+ with :
120+ name : ${{ github.ref_name }}
121+ generate_release_notes : true
122+ fail_on_unmatched_files : true
123+ files : |
124+ *.zip
0 commit comments