Prepare 2024.09.30 [updated] #78
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |