Skip to content

Release 1.1.0

Release 1.1.0 #1

Workflow file for this run

name: Release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
calculate_version:
uses: yepcode/github-actions/.github/workflows/calculate-version.yml@master

Check failure on line 11 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

error parsing called workflow ".github/workflows/release.yml" -> "yepcode/github-actions/.github/workflows/calculate-version.yml@master" : workflow was not found. See https://docs.github.com/actions/learn-github-actions/reusing-workflows#access-to-reusable-workflows for more information.
with:
githubRef: ${{ github.ref }}
check_version:
needs: calculate_version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check project version
run: |
PROJECT_VERSION=$(cat pyproject.toml|grep version|cut -f2 -d=|sed 's/[^0-9.]//g')
if [ "${{ needs.calculate_version.outputs.version }}" != "${PROJECT_VERSION}" ]; then
echo "ERROR: Project version mismatch. Tag: ${{ needs.calculate_version.outputs.version }}, Project: ${PROJECT_VERSION}" | tee -a $GITHUB_OUTPUT
exit 1
fi
tests:
needs: check_version
uses: ./.github/workflows/tests.yml
secrets: inherit
deploy:
needs:
- tests
runs-on: ubuntu-latest
container:
image: python:3.12-slim
env:
YEPCODE_API_TOKEN: ${{ secrets.TEST_YEPCODE_API_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Configure poetry
run: |-
apt update && apt install -y curl gcc g++ && curl -sSL https://install.python-poetry.org | python3 -
export PATH="${PATH}:${HOME}/.local/bin"
echo "${HOME}/.local/bin" >> $GITHUB_PATH
poetry install
- name: Build
run: "poetry build"
- name: Publish
run: "poetry config pypi-token.pypi ${{ secrets.PUBLIC_YEPCODE_PYPI_API_TOKEN }} && poetry publish"
create_release:
needs:
- deploy
- calculate_version
name: Create Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "v${{ needs.calculate_version.outputs.version }}"
name: "Release v${{ needs.calculate_version.outputs.version }}"
body: |
Published package version ${PROJECT_VERSION}
draft: false
prerelease: false