-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (87 loc) · 2.72 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Release creation
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
env:
PYTHON_VERSION: "3.12"
jobs:
build-linux:
name: Release on PyPi
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install the latest version of rye
uses: eifinger/setup-rye@v3
- name: Sync Rye
run: |
rye pin ${{ env.PYTHON_VERSION }} --relaxed
rye sync --all-features
# - name: Build and release on PyPi
# run: |
# rye build
# rye publish --token ${{ secrets.PYPI_TOKEN }} --yes
- name: Package Linux App
run: |
rye run box package
mv target/release/rimsschemedrawer target/release/rimsschemedrawer-linux
- name: Release
uses: softprops/action-gh-release@v2
with:
files:
${{ github.workspace }}/target/release/rimsschemedrawer-linux
tag_name: ${{ github.ref_name }}
name: RIMSSchemeDrawer ${{ github.ref_name }}
body_path: ${{ github.workspace }}/release_text.md
build-windows:
needs: build-linux
name: Package GUI for Windows and add to Release
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
pip install .
pip install box-packager
pip install build
- name: Package Windows App
run: |
box init -q -b build
rye run box package
mv target/release/rimsschemedrawer.exe target/release/rimsschemedrawer-windows.exe
- name: Add to Release
uses: softprops/action-gh-release@v1
with:
files:
target/release/rimsschemedrawer-windows.exe
tag_name: ${{ github.ref_name }}
build-macos:
needs: build-linux
name: Package GUI for MacOS and add to Release
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rye
uses: eifinger/setup-rye@v3
- name: Sync Rye
run: |
rye pin ${{ env.PYTHON_VERSION }} --relaxed
rye sync --all-features
- name: Package MacOS App
run: |
rye run box package
mv target/release/rimsschemedrawer target/release/rimsschemedrawer-macos
- name: Add to Release
uses: softprops/action-gh-release@v1
with:
files:
target/release/rimsschemedrawer-macos
tag_name: ${{ github.ref_name }}