Skip to content

[ci-release]: 4.211.0+esrf-1024-1-test #7

[ci-release]: 4.211.0+esrf-1024-1-test

[ci-release]: 4.211.0+esrf-1024-1-test #7

---
# yamllint disable rule:line-length
name: Release on tag
on: # yamllint disable-line rule:truthy
push: # yamllint disable-line rule:empty-values
jobs:
publish:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/prod' && "contains(github.event.head_commit.message, '[ci-release]')"

Check failure on line 13 in .github/workflows/release_on_tag.yml

View workflow run for this annotation

GitHub Actions / Release on tag

Invalid workflow file

The workflow is not valid. .github/workflows/release_on_tag.yml (Line: 13, Col: 9): Unexpected symbol: '"contains'. Located at position 36 within expression: github.ref == 'refs/heads/prod' && "contains(github.event.head_commit.message, '[ci-release]')"
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PUBLISH_ON_TAG_CI_TOKEN }}
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Set VERSION env
run: echo "VERSION=$(echo $github.event.head_commit.message | cut -d ":" -f2)" >> $GITHUB_ENV
- name: PyProject and create tag
id: create-tag
run: |
poetry version ${{ env.VERSION }}
git tag -a ${{ env.VERSION }} -m ${{ env.VERSION }}
git push prod
- name: Publish package to PyPI
id: publish-pacakge
run: |
pip install --upgrade pip
pip install poetry
poetry config repositories.gitlab ${{ vars.ESRF_GITLAB_PYPI_URI }}
poetry config http-basic.gitlab gitlab-ci-token ${{ secrets.ESRF_GITLAB_PYPI_TOKEN }}
poetry version ${{ github.ref_name }}
poetry build
poetry publish --repository gitlab