v6.10.1 #179
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release Windows | |
on: | |
push: | |
branches: | |
- master | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.7" | |
- name: Install 7-Zip | |
run: choco install 7zip -y | |
- name: Install dependencies | |
run: | | |
grep -vE "pyrx" requirements.txt > filtered_requirements.txt | |
python -m pip install --upgrade pip | |
pip install -r filtered_requirements.txt | |
pip install pyinstaller pytest | |
- name: Build with PyInstaller | |
run: | | |
python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())" > site_packages_path.txt | |
pyinstaller yadacoin/app.spec # or use the .spec file if you have one | |
- name: Zip the contents of dist directory | |
run: | | |
cd dist | |
7z a ../yadacoin-windows.zip ./* | |
- name: Add additional file to the zip | |
run: | | |
move winlibs/pyrx.cp37-win_amd64.pyd YadaCoin/ | |
move VERSION YadaCoin/ | |
7z u yadacoin-windows.zip ./YadaCoin/ | |
rm -r YadaCoin/ | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: yadacoin-windows.zip | |
path: yadacoin-windows.zip | |
- name: Upload Release Asset | |
if: github.event_name == 'release' | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: yadacoin-windows.zip | |
asset_name: yadacoin-windows.zip | |
asset_content_type: application/zip |