Skip to content

Add more tasks

Add more tasks #6

Workflow file for this run

name: Build and Release
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build
run: make build
- name: Release with incremented version
if: github.ref == 'refs/heads/main'
run: |
VERSION=$(cat version.txt 2>/dev/null || echo "1")
echo $((VERSION + 1)) > version.txt
tar -czf release-v${VERSION}.tar.gz release/
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add version.txt
git commit -m "Bump version to $((VERSION + 1))"
git push
- name: Upload release artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: release
path: release-v*.tar.gz