|
| 1 | +name: Release |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - v[0-9]+.[0-9]+.[0-9]+* |
| 7 | + |
| 8 | +jobs: |
| 9 | + linux: |
| 10 | + strategy: |
| 11 | + matrix: |
| 12 | + build-type: ['', portable] |
| 13 | + include: |
| 14 | + - build-type: '' |
| 15 | + build-flag: '' |
| 16 | + suffix: '' |
| 17 | + - build-type: portable |
| 18 | + build-flag: --portable |
| 19 | + suffix: _portable |
| 20 | + runs-on: ubuntu-22.04 |
| 21 | + steps: |
| 22 | + - uses: actions/checkout@v4 |
| 23 | + - uses: actions/setup-python@v5 |
| 24 | + with: |
| 25 | + python-version: '3.12' |
| 26 | + - run: pip install -Ur requirements.txt pyinstaller |
| 27 | + - run: pyinstaller tagstudio.spec -- ${{ matrix.build-flag }} |
| 28 | + - run: tar czfC dist/tagstudio_linux_x86_64${{ matrix.suffix }}.tar.gz dist tagstudio |
| 29 | + - uses: actions/upload-artifact@v4 |
| 30 | + with: |
| 31 | + name: tagstudio_linux_x86_64${{ matrix.suffix }} |
| 32 | + path: dist/tagstudio_linux_x86_64${{ matrix.suffix }}.tar.gz |
| 33 | + |
| 34 | + macos: |
| 35 | + strategy: |
| 36 | + matrix: |
| 37 | + os-version: ['11', '14'] |
| 38 | + include: |
| 39 | + - os-version: '11' |
| 40 | + arch: x86_64 |
| 41 | + - os-version: '14' |
| 42 | + arch: aarch64 |
| 43 | + runs-on: macos-${{ matrix.os-version }} |
| 44 | + env: |
| 45 | + MACOSX_DEPLOYMENT_TARGET: '11.0' |
| 46 | + steps: |
| 47 | + - uses: actions/checkout@v4 |
| 48 | + - uses: actions/setup-python@v5 |
| 49 | + with: |
| 50 | + python-version: '3.12' |
| 51 | + - run: pip install -Ur requirements.txt pyinstaller |
| 52 | + - run: pyinstaller tagstudio.spec |
| 53 | + - run: tar czfC dist/tagstudio_macos_${{ matrix.arch }}.tar.gz dist TagStudio.app |
| 54 | + - uses: actions/upload-artifact@v4 |
| 55 | + with: |
| 56 | + name: tagstudio_macos_${{ matrix.arch }} |
| 57 | + path: dist/tagstudio_macos_${{ matrix.arch }}.tar.gz |
| 58 | + |
| 59 | + windows: |
| 60 | + strategy: |
| 61 | + matrix: |
| 62 | + build-type: ['', portable] |
| 63 | + include: |
| 64 | + - build-type: '' |
| 65 | + build-flag: '' |
| 66 | + suffix: '' |
| 67 | + file-end: '' |
| 68 | + - build-type: portable |
| 69 | + build-flag: --portable |
| 70 | + suffix: _portable |
| 71 | + file-end: .exe |
| 72 | + runs-on: windows-2019 |
| 73 | + steps: |
| 74 | + - uses: actions/checkout@v4 |
| 75 | + - uses: actions/setup-python@v5 |
| 76 | + with: |
| 77 | + python-version: '3.12' |
| 78 | + - run: pip install -Ur requirements.txt pyinstaller |
| 79 | + - run: PyInstaller tagstudio.spec -- ${{ matrix.build-flag }} |
| 80 | + - run: Compress-Archive -Path dist/TagStudio${{ matrix.file-end }} -DestinationPath dist/tagstudio_windows_x86_64${{ matrix.suffix }}.zip |
| 81 | + - uses: actions/upload-artifact@v4 |
| 82 | + with: |
| 83 | + name: tagstudio_windows_x86_64${{ matrix.suffix }} |
| 84 | + path: dist/tagstudio_windows_x86_64${{ matrix.suffix }}.zip |
| 85 | + |
| 86 | + publish: |
| 87 | + needs: [linux, macos, windows] |
| 88 | + runs-on: ubuntu-latest |
| 89 | + permissions: |
| 90 | + contents: write |
| 91 | + steps: |
| 92 | + - uses: actions/checkout@v4 |
| 93 | + - uses: actions/download-artifact@v4 |
| 94 | + - uses: softprops/action-gh-release@v2 |
| 95 | + with: |
| 96 | + files: | |
| 97 | + tagstudio_linux_x86_64/* |
| 98 | + tagstudio_linux_x86_64_portable/* |
| 99 | + tagstudio_macos_x86_64/* |
| 100 | + tagstudio_macos_x86_64_portable/* |
| 101 | + tagstudio_macos_arm64/* |
| 102 | + tagstudio_macos_arm64_portable/* |
| 103 | + tagstudio_windows_x86_64/* |
| 104 | + tagstudio_windows_x86_64_portable/* |
0 commit comments