-
Notifications
You must be signed in to change notification settings - Fork 4
97 lines (93 loc) · 3.1 KB
/
release.yaml
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
name: Release
on:
push:
tags:
- '*'
jobs:
release-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.11"
- name: Install dependencies
run: pdm install --prod -G chaostoolkit -G extra
- name: Build for Linux
run: |
$(pdm venv activate)
pdm export -f requirements --no-markers --no-hashes -G chaostoolkit --no-default --pyproject -o requirements-chaostoolkit.txt
export CHAOSTOOLKIT_PATH=`which chaos`
pyinstaller chaos.spec
export CAL_VERSION=`cat VERSION`
mv dist/chaos dist/chaostoolkit-bundle_linux-amd64-${CAL_VERSION}
ls dist/
- name: Create Release
uses: ncipollo/release-action@v1
with:
draft: false
prerelease: false
artifacts: "dist/chaostoolkit-bundle*"
bodyFile: "requirements-chaostoolkit.txt"
token: ${{ secrets.GITHUB_TOKEN }}
release-macosx:
needs: release-linux
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.11"
- name: Install dependencies
run: pdm install --prod -G chaostoolkit -G extra
- name: Build for MacOSX
run: |
$(pdm venv activate)
export CHAOSTOOLKIT_PATH=`which chaos`
pyinstaller chaos.spec
export CAL_VERSION=`cat VERSION`
mv dist/chaos dist/chaostoolkit-bundle_darwin-amd64-${CAL_VERSION}
ls dist/
- name: Update Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: false
artifacts: "dist/chaostoolkit-bundle*"
token: ${{ secrets.GITHUB_TOKEN }}
release-windows:
needs: release-linux
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.11"
- name: Install dependencies
run: pdm install --prod -G chaostoolkit -G extra
- name: Build for Windows
run: |
Invoke-Expression (pdm venv activate)
$env:CHAOSTOOLKIT_PATH=$(python -c "import importlib;print(importlib.import_module('chaostoolkit.__main__').__file__)")
$env:CAL_VERSION=$(type VERSION)
$env:PYTHONUTF8=1
pyinstaller chaos.spec
Rename-Item -Path "dist/chaos.exe" -NewName "chaostoolkit-bundle_windows-amd64-$env:CAL_VERSION"
dir dist/
- name: Update Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: false
artifacts: "dist/chaostoolkit-bundle*"
token: ${{ secrets.GITHUB_TOKEN }}