Skip to content

Merge pull request #26 from pollenjp/release/v1.1.1 #9

Merge pull request #26 from pollenjp/release/v1.1.1

Merge pull request #26 from pollenjp/release/v1.1.1 #9

Workflow file for this run

---
name: TestPyPI Publish
on:
workflow_dispatch:
push:
branches:
- main-pre
permissions:
contents: read
env:
UV_VERSION: 0.4.1
jobs:
# https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-pypi
release-build:
runs-on: ubuntu-latest
steps:
- name: Instal uv
run: |
set -eux -o pipefail -o posix
curl -LsSf https://astral.sh/uv/${{ env.UV_VERSION }}/install.sh | sh
echo PATH="${HOME}/.cargo/bin:${PATH}" >> "${GITHUB_ENV}"
- uses: actions/checkout@v4
- name: Build
run: uvx --from build pyproject-build --installer uv
- name: upload dists
uses: actions/upload-artifact@v3
with:
name: release-dists
path: dist/
test-pypi-publish: # https://github.com/pypa/gh-action-pypi-publish
name: Upload release to TestPyPI
runs-on: ubuntu-latest
needs:
- release-build
environment:
name: testpypi
url: https://test.pypi.org/p/ansible-lint-custom-strict-naming
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v3
with:
name: release-dists
path: dist/
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/