|
1 | 1 | name: GitHub release
|
2 | 2 |
|
3 | 3 | on:
|
4 |
| - workflow_dispatch: |
5 |
| - push: |
6 |
| - branches: |
7 |
| - - master |
8 |
| - - develop |
9 |
| - paths-ignore: |
10 |
| - - '.github/**' |
11 |
| - - '**.md' |
| 4 | + workflow_dispatch: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - master |
| 8 | + - develop |
| 9 | + paths-ignore: |
| 10 | + - '.github/**' |
| 11 | + - '**.md' |
12 | 12 |
|
13 | 13 | jobs:
|
14 |
| - Binaries: |
15 |
| - runs-on: ${{ matrix.os }} |
16 |
| - outputs: |
17 |
| - version-tag: ${{ steps.version_tag.outputs.VERSION_TAG }} |
18 |
| - strategy: |
19 |
| - fail-fast: false |
20 |
| - matrix: |
21 |
| - include: |
22 |
| - - os: windows-2019 |
23 |
| - arch: x86 |
24 |
| - - os: windows-2019 |
25 |
| - arch: x64 |
26 |
| - - os: macos-13 |
27 |
| - arch: x64 |
| 14 | + Binaries: |
| 15 | + runs-on: ${{ matrix.os }} |
| 16 | + outputs: |
| 17 | + version-tag: ${{ steps.version_tag.outputs.VERSION_TAG }} |
| 18 | + strategy: |
| 19 | + fail-fast: false |
| 20 | + matrix: |
| 21 | + include: |
| 22 | + - os: windows-2019 |
| 23 | + arch: x86 |
| 24 | + - os: windows-2019 |
| 25 | + arch: x64 |
| 26 | + - os: macos-13 |
| 27 | + arch: x64 |
28 | 28 |
|
29 |
| - steps: |
30 |
| - - uses: actions/checkout@v3 |
31 |
| - with: |
32 |
| - fetch-depth: 0 |
33 |
| - - name: Set up Python 3.8 |
34 |
| - uses: actions/setup-python@v4 |
35 |
| - with: |
36 |
| - python-version: '3.8' |
37 |
| - architecture: ${{ matrix.arch }} |
| 29 | + steps: |
| 30 | + - uses: actions/checkout@v3 |
| 31 | + with: |
| 32 | + fetch-depth: 0 |
| 33 | + - name: Set up Python 3.8 |
| 34 | + uses: actions/setup-python@v4 |
| 35 | + with: |
| 36 | + python-version: '3.8' |
| 37 | + architecture: ${{ matrix.arch }} |
38 | 38 |
|
39 |
| - - name: Install PyInstaller |
40 |
| - run: pip install -r requirements_build.txt |
| 39 | + - name: Install PyInstaller |
| 40 | + run: pip install -r requirements_build.txt |
41 | 41 |
|
42 |
| - - name: Retrieve version tag |
43 |
| - id: version_tag |
44 |
| - shell: bash |
45 |
| - run: echo "VERSION_TAG=$(python -m setuptools_scm)" >> $GITHUB_OUTPUT |
| 42 | + - name: Retrieve version tag |
| 43 | + id: version_tag |
| 44 | + shell: bash |
| 45 | + run: echo "VERSION_TAG=$(python -m setuptools_scm)" >> $GITHUB_OUTPUT |
46 | 46 |
|
47 |
| - - name: Build with PyInstaller |
48 |
| - run: pyinstaller --noconfirm --clean tdmgr.spec |
| 47 | + - name: Build with PyInstaller |
| 48 | + run: pyinstaller --noconfirm --clean tdmgr.spec |
49 | 49 |
|
50 |
| - - name: Create .dmg |
51 |
| - if: matrix.os == 'macos-13' |
52 |
| - shell: bash |
53 |
| - run: | |
54 |
| - brew install create-dmg |
55 |
| - newfile=$(basename dist/*.app .app).dmg |
56 |
| - create-dmg $newfile dist |
57 |
| - rm dist/*.app |
58 |
| - mv /Users/runner/work/tdm/tdm/*.dmg dist |
| 50 | + - name: Create .dmg |
| 51 | + if: matrix.os == 'macos-13' |
| 52 | + shell: bash |
| 53 | + run: | |
| 54 | + brew install create-dmg |
| 55 | + newfile=$(basename dist/*.app .app).dmg |
| 56 | + create-dmg $newfile dist |
| 57 | + rm dist/*.app |
| 58 | + mv /Users/runner/work/tdm/tdm/*.dmg dist |
59 | 59 |
|
60 |
| - - name: Upload binaries artifact to workflow |
61 |
| - uses: actions/upload-artifact@v3 |
62 |
| - with: |
63 |
| - name: tdmgr |
64 |
| - path: dist/* |
| 60 | + - name: Upload binaries artifact to workflow |
| 61 | + uses: actions/upload-artifact@v3 |
| 62 | + with: |
| 63 | + name: tdmgr |
| 64 | + path: dist/* |
65 | 65 |
|
66 |
| - Draft-Release: |
67 |
| - runs-on: ubuntu-latest |
68 |
| - needs: Binaries |
69 |
| - env: |
70 |
| - VERSION_TAG: ${{ needs.Binaries.outputs.version-tag }} |
71 |
| - steps: |
72 |
| - - name: Download artifacts from build |
73 |
| - uses: actions/download-artifact@v3 |
| 66 | + Draft-Release: |
| 67 | + runs-on: ubuntu-latest |
| 68 | + needs: Binaries |
| 69 | + env: |
| 70 | + VERSION_TAG: ${{ needs.Binaries.outputs.version-tag }} |
| 71 | + steps: |
| 72 | + - name: Download artifacts from build |
| 73 | + uses: actions/download-artifact@v3 |
74 | 74 |
|
75 |
| - - name: Create Draft Release |
76 |
| - id: create_release |
77 |
| - uses: softprops/action-gh-release@v2 |
78 |
| - env: |
79 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
80 |
| - with: |
81 |
| - tag_name: ${{ env.VERSION_TAG }} |
82 |
| - name: TDM ${{ env.VERSION_TAG }} |
83 |
| - draft: true |
84 |
| - prerelease: ${{ github.ref_name == 'refs/heads/develop'}} |
85 |
| - generate_release_notes: true |
86 |
| - files: tdmgr/* |
| 75 | + - name: Create Draft Release |
| 76 | + id: create_release |
| 77 | + uses: softprops/action-gh-release@v2 |
| 78 | + env: |
| 79 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 80 | + with: |
| 81 | + tag_name: ${{ github.ref == 'refs/heads/develop' && 'pre' || '' }}${{ env.VERSION_TAG }} |
| 82 | + name: TDM ${{ env.VERSION_TAG }} |
| 83 | + draft: true |
| 84 | + prerelease: ${{ github.ref_name == 'refs/heads/develop'}} |
| 85 | + generate_release_notes: true |
| 86 | + files: tdmgr/* |
0 commit comments