diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 67f3a01..31cffd7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,8 @@ name: Build, Test, and Publish to PyPI on: push: tags: - - 'v*.*.*' # Matches version tags like v1.0.0, v2.1.3, etc. + - 'v*.*.*' # Matches version tags like v1.0.0, v2.1.3, etc. + jobs: pypi-publish: name: Upload release to PyPI @@ -13,22 +14,28 @@ jobs: fail-fast: false matrix: python-version: ["3.12"] + environment: name: pypi url: https://pypi.org/p/bibmon + permissions: - id-token: write # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing + steps: - # retrieve your distributions here - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies and generate package - run: | - python -m pip install --upgrade pip - pip install --upgrade setuptools - python setup.py sdist bdist_wheel - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies and generate package + run: | + python -m pip install --upgrade pip + pip install --upgrade setuptools + python setup.py sdist bdist_wheel + + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1