Skip to content

Commit 8bc7c5c

Browse files
authored
Update github actions for releasing
1 parent b052a1e commit 8bc7c5c

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

.github/workflows/publish-release.yml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,47 @@ jobs:
2929
github_token: ${{ secrets.TOKEN }}
3030
branch: main
3131

32+
build:
33+
name: Build packages
34+
needs: update-changelog
35+
runs-on: ${{ matrix.os }}
36+
strategy:
37+
matrix:
38+
include:
39+
- os: windows-latest
40+
TARGET: windows
41+
CMD_BUILD: >
42+
pyinstaller --onefile cli.py -n cli --additional-hooks-dir=hooks &&
43+
move dist/cli.exe fosslight_reuse_windows.exe
44+
OUT_FILE_NAME: fosslight_reuse_windows.exe
45+
ASSET_MIME: application/vnd.microsoft.portable-executable
46+
steps:
47+
- uses: actions/checkout@v2
48+
- name: Set up Python 3.6
49+
uses: actions/setup-python@v2
50+
with:
51+
python-version: 3.6
52+
- name: Install dependencies
53+
run: |
54+
python -m pip install --upgrade pip
55+
pip install .
56+
pip install pyinstaller
57+
- name: Build with pyinstaller for ${{matrix.TARGET}}
58+
run: ${{matrix.CMD_BUILD}}
59+
- name: Upload Release Asset
60+
id: upload-release-asset
61+
uses: actions/[email protected]
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.TOKEN }}
64+
with:
65+
upload_url: ${{ github.event.release.upload_url }}
66+
asset_path: ./${{ matrix.OUT_FILE_NAME}}
67+
asset_name: ${{ matrix.OUT_FILE_NAME}}
68+
asset_content_type: ${{ matrix.ASSET_MIME}}
69+
3270
deploy:
3371
runs-on: ubuntu-18.04
34-
needs: update-changelog
72+
needs: build
3573
steps:
3674
- uses: actions/checkout@v2
3775
- name: Set up Python

0 commit comments

Comments
 (0)