|
| 1 | +name: Create Windows Executable using Miniconda |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + # tags: |
| 6 | + # - '*' |
| 7 | + |
| 8 | +jobs: |
| 9 | + miniconda: |
| 10 | + name: Miniconda ${{ matrix.os }} |
| 11 | + runs-on: ${{ matrix.os }} |
| 12 | + strategy: |
| 13 | + matrix: |
| 14 | + os: ["windows-latest"] |
| 15 | + steps: |
| 16 | + - name: Checkout Repository |
| 17 | + uses: actions/checkout@v2 |
| 18 | + - name: Setup Miniconda |
| 19 | + uses: conda-incubator/setup-miniconda@v2 |
| 20 | + with: |
| 21 | + activate-environment: build-installer |
| 22 | + environment-file: ./contrib/Installer/environment.yaml |
| 23 | + python-version: 3.9 |
| 24 | + auto-activate-base: false |
| 25 | + - name: Collect Conda Info |
| 26 | + shell: bash -l {0} |
| 27 | + run: | |
| 28 | + conda info |
| 29 | + conda env export |
| 30 | + - name: Get Application Version |
| 31 | + id: get_version |
| 32 | + uses: battila7/get-version-action@v2 |
| 33 | + - name: Build Installer |
| 34 | + shell: bash -l {0} |
| 35 | + working-directory: ./contrib/Installer |
| 36 | + run: | |
| 37 | + pyinstaller --add-data="assets/*;./" --noupx --onefile mtfg-ofs-extension-installer.py |
| 38 | + - name: Create Release |
| 39 | + id: create_release |
| 40 | + uses: actions/create-release@v1 |
| 41 | + env: |
| 42 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 43 | + with: |
| 44 | + tag_name: ${{ steps.get_version.outputs.version }} |
| 45 | + release_name: ${{ steps.get_version.outputs.version }} |
| 46 | + draft: true |
| 47 | + prerelease: true |
| 48 | + - name: Upload Installer |
| 49 | + id: upload-release-asset-1 |
| 50 | + uses: actions/upload-release-asset@v1 |
| 51 | + env: |
| 52 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 53 | + with: |
| 54 | + upload_url: ${{ steps.create_release.outputs.upload_url }} |
| 55 | + asset_path: ./contrib/Installer/dist/mtfg-ofs-extension-installer.exe |
| 56 | + asset_name: mtfg-ofs-extension-installer.exe |
| 57 | + asset_content_type: application/octet-stream |
0 commit comments