This repository has been archived by the owner on May 1, 2024. It is now read-only.
upd(pacup): 2.0.0
-> 2.1.0
#14
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: CD # Continuous Deployment | |
on: | |
push: | |
tags: | |
- "[v]?[0-9]+.[0-9]+.[0-9]+" | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Load cached venv and build cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
.venv | |
build | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install project | |
run: poetry install --no-interaction --no-root --without dev --with build | |
- name: Build binary using PyInstaller | |
run: | | |
source .venv/bin/activate | |
mkdir -p build/ | |
pyinstaller --name pacup --onefile pacup/__main__.py | |
- name: Upload assets | |
uses: actions/upload-artifact@v3 | |
if: github.event_name == 'workflow_dispatch' | |
with: | |
name: pacup | |
path: dist/pacup | |
- name: Build and publish to PyPI | |
uses: JRubics/[email protected] | |
if: github.event_name != 'workflow_dispatch' | |
with: | |
pypi_token: ${{ secrets.PYPI_TOKEN }} | |
- name: Release assets | |
uses: softprops/action-gh-release@v1 | |
if: github.event_name != 'workflow_dispatch' | |
with: | |
files: | | |
dist/pacup | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |