Skip to content

fix: rc tag breaking glob pattern #67

fix: rc tag breaking glob pattern

fix: rc tag breaking glob pattern #67

Workflow file for this run

name: publish
on:
push:
tags:
- 'agent-builder-turbo-[0-9]+.[0-9]+.[0-9]+-image-[0-9]+.[0-9]+.[0-9]+-main'
- 'agent-builder-turbo-[0-9]+.[0-9]+.[0-9]+rc[0-9]+-image-[0-9]+.[0-9]+.[0-9]+-main'
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Extract version from tag
id: extract_version
run: |
REF="${{ github.ref_name }}"
if [[ "$REF" =~ ^agent-builder-turbo-([0-9]+\.[0-9]+\.[0-9]+(rc[0-9]+)?)-image-([0-9]+\.[0-9]+\.[0-9]+)-main$ ]]; then
echo "version=${BASH_REMATCH[1]}" >> "$GITHUB_OUTPUT"
else
echo "Unable to parse version from tag: $REF" >&2
exit 1
fi
- name: Show extracted version
run: echo "Version is ${{ steps.extract_version.outputs.version }}"
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
cache: 'poetry'
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "22.x"
cache: npm
- name: Update version before publishing
run: poetry version ${{ steps.extract_version.outputs.version }}
- name: install python3 environment
run: poetry install --with build
- name: install ci dependencies and generate code
run: poetry run alfred install.ci
- name: publish on pypi
run: |
poetry run alfred publish.pypi
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}