Skip to content

chore: bump version to 2.3.1 #22

chore: bump version to 2.3.1

chore: bump version to 2.3.1 #22

Workflow file for this run

name: Publish Release
on:
push:
tags:
- 'v*.*.*'
jobs:
pypi_publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/weeb-cli
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
build_binaries:
name: Build Binaries
needs: pypi_publish
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
arch: x64
artifact_name: weeb-cli-Linux-x86_64
binary_name: weeb-cli
- os: windows-latest
arch: x64
artifact_name: weeb-cli-Windows-x86_64.exe
binary_name: weeb-cli.exe
- os: windows-latest
arch: x86
artifact_name: weeb-cli-Windows-x86.exe
binary_name: weeb-cli.exe
- os: macos-15 # Intel
arch: x64
artifact_name: weeb-cli-macOS-x86_64
binary_name: weeb-cli
- os: macos-latest # ARM
arch: arm64
artifact_name: weeb-cli-macOS-arm64
binary_name: weeb-cli
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: ${{ matrix.arch }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install . pyinstaller
- name: Build with PyInstaller
run: |
pyinstaller --name weeb-cli --onefile --clean --noconfirm --icon weeb_landing/logo/favicon.ico weeb_cli/__main__.py --collect-all weeb_cli --collect-all rich --collect-all questionary --collect-all typer
- name: Rename Binary
shell: bash
run: |
mv dist/${{ matrix.binary_name }} dist/${{ matrix.artifact_name }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: binary-${{ matrix.artifact_name }}
path: dist/${{ matrix.artifact_name }}
aur_publish:
name: Publish to AUR
needs: pypi_publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update PKGBUILD version
run: |
VERSION=${GITHUB_REF_NAME#v}
sed -i "s/pkgver=0.0.0/pkgver=$VERSION/" distribution/aur/PKGBUILD
- name: Publish to AUR
uses: KSXGitHub/github-actions-deploy-aur@v2.7.2
with:
pkgname: weeb-cli
pkgbuild: ./distribution/aur/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: Update to ${{ github.ref_name }}
force_push: true
release:
name: Create GitHub Release
needs: [build_binaries]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: binary-*
merge-multiple: true
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
artifacts/*
generate_release_notes: true