Skip to content

Update and rename publish_on_tag.yml to release_on_tag.yml #2

Update and rename publish_on_tag.yml to release_on_tag.yml

Update and rename publish_on_tag.yml to release_on_tag.yml #2

---
# yamllint disable rule:line-length
name: Release on tag
on: # yamllint disable-line rule:truthy
push:
jobs:
publish:
runs-on: ubuntu-latest
if: 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: PyProject and create tag
id: create-tag
env:
VERSION: ${{ (echo $github.event.head_commit.message | cut -d ":" -f2) }}

Check failure on line 25 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: 25, Col: 20): Unrecognized named-value: 'echo'. Located at position 2 within expression: (echo $github.event.head_commit.message | cut -d ":" -f2)
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