-
-
Notifications
You must be signed in to change notification settings - Fork 0
132 lines (130 loc) · 3.7 KB
/
main.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: Lint and Build
on:
release:
types:
- created
push:
pull_request:
permissions:
packages: write
jobs:
ruff:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
python-version: 3.8
- run: pip install -r requirements-dev.txt
- run: ruff --output-format=github .
docker:
runs-on: ubuntu-22.04
needs:
- ruff
steps:
- uses: actions/[email protected]
- uses: docker/[email protected]
- uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- uses: docker/[email protected]
id: meta
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=sha,format=short,prefix=
type=raw,value=latest,enable={{ is_default_branch }}
- uses: docker/[email protected]
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
wheel:
runs-on: ubuntu-22.04
needs:
- ruff
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
python-version: 3.8
- run: pip install build
- run: python -m build
- uses: actions/[email protected]
with:
name: ${{ github.event.repository.name }}.Wheel
path: dist/*
if-no-files-found: error
windows:
runs-on: windows-2019
needs:
- ruff
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
python-version: 3.8
- run: pip install -r requirements-dev.txt
- run: python -m nuitka --standalone --onefile --output-filename="5desc" --output-dir="build" --assume-yes-for-downloads fivedesc.py
- uses: actions/[email protected]
with:
name: ${{ github.event.repository.name }}.Windows
path: build/5desc.exe
if-no-files-found: error
pacman:
runs-on: ubuntu-22.04
needs:
- ruff
container: archlinux
steps:
- run: pacman -Syu --noconfirm base-devel git python-pip
- uses: actions/[email protected]
- run: git clone https://aur.archlinux.org/python-marko.git marko && cd marko && makepkg -sif --noconfirm && cd ../ && rm -rf marko
env:
EUID: "1"
- run: pip install -r requirements-dev.txt --break-system-packages
- run: makepkg -sf --noconfirm
env:
EUID: "1"
- uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}.Arch
path: "*.tar.*"
if-no-files-found: error
release:
runs-on: ubuntu-22.04
needs:
- docker
- wheel
- windows
- pacman
steps:
- uses: actions/[email protected]
with:
name: ${{ github.event.repository.name }}.Wheel
path: dist/Python
- uses: actions/[email protected]
with:
name: ${{ github.event.repository.name }}.Windows
path: dist/Windows
- uses: actions/[email protected]
with:
name: ${{ github.event.repository.name }}.Arch
path: dist/Arch Linux
- run: ls -R
- run: 7z a ${{ github.event.repository.name }}.zip ${{ github.workspace }}
- uses: actions/[email protected]
with:
name: ${{ github.event.repository.name }}
path: dist/*
if-no-files-found: error
run:
runs-on: ubuntu-22.04
needs:
- docker
steps:
- uses: actions/[email protected]
- uses: ./
env:
GITHUB_TOKEN: ${{ github.token }}