[ci-release]: 4.211.0+esrf-1024-1-test #7
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
--- | ||
# 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 GitHub Actions / Release on tagInvalid workflow file
|
||
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 |