Skip to content

Commit

Permalink
Create publish_on_tag.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-oscarsson committed Oct 17, 2024
1 parent e784fb9 commit a020dd5
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish_on_tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---

# yamllint disable rule:line-length

name: Publish on tag

on: # yamllint disable-line rule:truthy
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]*'

jobs:
publish:
runs-on: ubuntu-latest
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: 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

0 comments on commit a020dd5

Please sign in to comment.