Skip to content

Commit db64437

Browse files
authored
Update ci (#287)
1 parent 535633b commit db64437

File tree

3 files changed

+75
-75
lines changed

3 files changed

+75
-75
lines changed

.github/workflows/release.yml

Lines changed: 73 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,86 @@
11
name: GitHub release
22

33
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'
1212

1313
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
2828

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 }}
3838

39-
- name: Install PyInstaller
40-
run: pip install -r requirements_build.txt
39+
- name: Install PyInstaller
40+
run: pip install -r requirements_build.txt
4141

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
4646

47-
- name: Build with PyInstaller
48-
run: pyinstaller --noconfirm --clean tdmgr.spec
47+
- name: Build with PyInstaller
48+
run: pyinstaller --noconfirm --clean tdmgr.spec
4949

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
5959
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/*
6565

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
7474

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/*

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools>=64", "setuptools-scm>=8"]
2+
requires = ["setuptools>=64", "setuptools-scm[toml]>=8"]
33
build-backend = "setuptools.build_meta"
44

55
[project]

requirements_build.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
-r requirements.txt
22
pyinstaller>=4
33
setuptools>=64
4-
setuptools-scm>=8
4+
setuptools-scm[toml]>=8

0 commit comments

Comments
 (0)