Skip to content

Set version to 0.1.0 for initial PyPI release #1

Set version to 0.1.0 for initial PyPI release

Set version to 0.1.0 for initial PyPI release #1

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
id-token: write
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
build-executables:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
asset_name: vector-bot-linux
- os: windows-latest
asset_name: vector-bot-windows.exe
- os: macOS-latest
asset_name: vector-bot-macos
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pyinstaller
- name: Build executable
run: python build_executable.py
- name: Rename executable (Unix)
if: runner.os != 'Windows'
run: |
mv dist/vector-bot dist/${{ matrix.asset_name }}
- name: Rename executable (Windows)
if: runner.os == 'Windows'
run: |
move dist\vector-bot.exe dist\${{ matrix.asset_name }}
- name: Upload executable to release
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset_name }}
path: dist/${{ matrix.asset_name }}
create-release:
needs: [build-and-publish, build-executables]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts
- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release v${{ steps.version.outputs.VERSION }}
body: |
## Vector Bot v${{ steps.version.outputs.VERSION }}
### Installation
**Python Package:**
```bash
pip install vector-bot==${{ steps.version.outputs.VERSION }}
```
**Pre-built Executables:**
- Linux: Download `vector-bot-linux`
- Windows: Download `vector-bot-windows.exe`
- macOS: Download `vector-bot-macos`
### Changes
See [CHANGELOG.md](CHANGELOG.md) for detailed changes.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
draft: false
prerelease: false
- name: Upload Release Assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/vector-bot-linux/vector-bot-linux
asset_name: vector-bot-linux
asset_content_type: application/octet-stream
- name: Upload Windows Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/vector-bot-windows.exe/vector-bot-windows.exe
asset_name: vector-bot-windows.exe
asset_content_type: application/octet-stream
- name: Upload macOS Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/vector-bot-macos/vector-bot-macos
asset_name: vector-bot-macos
asset_content_type: application/octet-stream