Skip to content

chore: rename requirement file #73

chore: rename requirement file

chore: rename requirement file #73

Workflow file for this run

name: build and release
on:
push:
branches:
- main
workflow_dispatch:
inputs:
isPrerelease:
description: "Select whether this is pre-release"
required: true
default: "false"
type: choice
options:
- "true"
- "false"
permissions:
contents: write
env:
IS_PRERELEASE: ${{ github.event.inputs.isPrerelease || false }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Build And Assemble
run: |
python3 -m pip install -r requirement-uv.txt
uv sync --frozen --no-install-project
export PYTHONPATH=$(pwd)
uv run scripts/run_tests.py
uv run scripts/multi_build.py
- name: Publish Artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: "multi-build"
retention-days: 1
if-no-files-found: "error"
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Retrieve artifacts
uses: actions/download-artifact@v3
with:
name: build-artifacts
path: "multi-build"
- name: Get current version
id: version
run: echo "version=$(python3 scripts/get_version.py)" >> $GITHUB_OUTPUT
- name: Form a tag name
id: tagname
run: echo "tagname=v${{ steps.version.outputs.version }}" >> $GITHUB_OUTPUT
- name: Release
uses: ncipollo/release-action@v1
with:
draft: true
skipIfReleaseExists: true
tag: ${{ steps.tagname.outputs.tagname }}
prerelease: ${{ env.IS_PRERELEASE }}
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "multi-build/*.zip"