Merge pull request #671 from aarhusstadsarkiv/dev-matca #17
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: Build Wheels | ||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
env: | ||
PYTHON_VERSION: 3.9.18 | ||
POETRY_VERSION: 1.6.1 | ||
jobs: | ||
wheel: | ||
name: Build Wheels | ||
runs-on: ubuntu-latest | ||
if: ${{ github.ref_name == "master" }} | ||
Check failure on line 16 in .github/workflows/build.yml GitHub Actions / Build WheelsInvalid workflow file
|
||
outputs: | ||
tag: ${{ steps.tag.outputs.tag }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
- uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: ${{ env.POETRY_VERSION }} | ||
- name: Build Dependencies Wheels | ||
run: python -m pip wheel -w dist . | ||
- name: Build Package Wheel | ||
run: | | ||
acacore="$(grep 'acacore =' pyproject.toml | grep -oE 'tag[ ]*=[ ]*"[^"]+"')" | ||
acacore="${acacore#*\"}" | ||
acacore="${acacore#v}" | ||
acacore="${acacore%\"}" | ||
sed -ie "s/acacore *=.*/acacore = \"$acacore\"/g" pyproject.toml | ||
poetry build | ||
- name: Get Tag | ||
id: tag | ||
run: echo "tag=$(git tag -l --sort=-version:refname | head -1)" >> "$GITHUB_OUTPUT" | ||
- name: Create Wheels ZIP | ||
run: zip -j wheels.zip dist/*.whl | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
tag_name: ${{ steps.tag.outputs.tag }} | ||
name: ${{ steps.tag.outputs.tag }} | ||
files: | | ||
dist/* | ||
wheels.zip |