Skip to content

Create version-ids.json #65

Create version-ids.json

Create version-ids.json #65

Workflow file for this run

name: build
on:
pull_request:
branches:
- main
push:
branches:
- main
defaults:
run:
shell: bash
jobs:
repos:
name: Build for ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout the Git repository
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.8'
cache: 'pip'
- name: Build codexctl
run: |
pip install wheel
pip install -r requirements.txt
pip install nuitka
mkdir -p dist
python -m nuitka \
--enable-plugin=pylint-warnings \
--onefile \
--lto=yes \
--assume-yes-for-downloads \
--remove-output \
--output-dir=dist \
modules/codexctl.py
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}
path: dist
if-no-files-found: error
release:
name: Release
needs: [repos]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
permissions:
contents: write
steps:
- name: Set current date as env variable
run: |
echo "NAME=$(date +'%Y-%m-%d %H:%M')" >> $GITHUB_ENV
echo "TAG=$(date +%s)" >> $GITHUB_ENV
- uses: actions/download-artifact@v3
with:
path: artifacts
- name: Rename artifacts
run: |
ls artifacts | while read artifact; do
pushd artifacts/${artifact}
zip -r ../${artifact}.zip .
popd
done
- uses: ncipollo/release-action@v1
with:
artifacts: "artifacts/*.zip"
name: ${{ env.NAME }}
tag: ${{ env.TAG }}
commit: ${{ github.sha }}
generateReleaseNotes: true
makeLatest: true