Build wheel #1018
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: Build wheel | |
on: | |
workflow_run: | |
workflows: [ Python Packaging ] | |
types: [ completed, requested ] | |
jobs: | |
version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.workflow_run.head_branch }} | |
fetch-depth: 1 | |
persist-credentials: false | |
- name: Get new version string | |
uses: miigotu/actions-calver@workflows | |
id: next-version | |
with: | |
release: false | |
pre: true | |
draft: true | |
date_format: "%Y.%m.%-d" | |
patch_separator: "-" | |
version_regexp: '^20[^\-]*$' | |
release_branch: ${{ github.branch }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
cache: 'yarn' | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Setup Poetry | |
uses: 5yutan5/[email protected] | |
with: | |
python-version: "3.11" | |
python-cache-dependency-path: pyproject.toml | |
- run: | | |
poetry version ${{ steps.next-version.outputs.release }} | |
yarn version --no-version-git-tag --no-commit-hooks --new-version ${{ steps.next-version.outputs.release }} | |
poetry build | |
env: | |
YARN_VERSION_GIT_TAG: "" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Result | |
path: | | |
dist/*.whl | |
dist/*.tar.gz | |
- run: | | |
echo "${{ steps.next-version.outputs.changelog }}" |