Merge branch 'v1.4.x' into test_under_slurm #11
Workflow file for this run
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
name: Publish Package | ||
on: | ||
release: | ||
types: [ released ] | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
jobs: | ||
run-tests: | ||
name: Tests | ||
uses: ./.github/workflows/PackageTest.yml | ||
secrets: inherit | ||
publish-package: | ||
name: Publish Distribution | ||
needs: run-tests | ||
runs-on: ubuntu-latest | ||
environment: ${{ matrix.environment }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- host: https://py00.crc.pitt.edu | ||
environment: publish-h2p | ||
- host: https://upload.pypi.org/legacy/ | ||
environment: publish-pypi | ||
steps: | ||
<<<<<<< HEAD | ||
======= | ||
- name: Checkout source | ||
uses: actions/checkout@v4 | ||
>>>>>>> v0.4.x | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: false | ||
<<<<<<< HEAD | ||
- name: Checkout source | ||
uses: actions/checkout@v3 | ||
# Get the new package version from the release tag | ||
# Release tags are expected to start with "refs/tags/v", so the first 11 characters are stripped | ||
- name: Set package version | ||
run: | | ||
release_tag=${{github.ref}} | ||
poetry version "${release_tag:11}" | ||
======= | ||
# Get the new package version from the release tag | ||
# Git release tags are expected to start with "refs/tags/v" | ||
- name: Set package version | ||
run: | | ||
release_tag=${{github.ref}} | ||
poetry version "${release_tag#refs/tags/v}" | ||
>>>>>>> v0.4.x | ||
- name: Build package | ||
run: poetry build -v | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
<<<<<<< HEAD | ||
verbose: true | ||
======= | ||
print-hash: true | ||
>>>>>>> v0.4.x | ||
repository-url: ${{ matrix.host }} | ||
user: ${{ secrets.REPO_USER }} | ||
password: ${{ secrets.REPO_PASSWORD }} |