ci: Test skip publish package #24
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 Python 🐍 distribution 📦 to PyPI | ||
on: | ||
# workflow_run: | ||
# workflows: ["Tests"] | ||
# branches: [development] | ||
# types: | ||
# - completed | ||
push: | ||
branches: | ||
- 'development' | ||
# pull_request: | ||
# branches: | ||
# - 'development' | ||
jobs: | ||
# build: | ||
# name: Build distribution 📦 | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - name: Set up Python | ||
# uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: "3.11" | ||
# - name: Install pypa/build | ||
# run: >- | ||
# python3 -m | ||
# pip install | ||
# build | ||
# --user | ||
# - name: Build a binary wheel and a source tarball | ||
# run: python3 -m build | ||
# - name: Store the distribution packages | ||
# uses: actions/upload-artifact@v3 | ||
# with: | ||
# name: python-package-distributions | ||
# path: dist/ | ||
release: | ||
name: Release new 🐍 version and Publish 📦 to TestPyPI | ||
runs-on: ubuntu-latest | ||
concurrency: release | ||
permissions: | ||
id-token: write | ||
contents: write | ||
environment: | ||
name: testpypi | ||
url: https://test.pypi.org/p/python-project-cli | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Check for new Relase and ...release | ||
uses: python-semantic-release/python-semantic-release@master | ||
with: | ||
github_token: ${{ secrets.ACCESS_TOKEN }} | ||
# steps: | ||
# - name: Download all the dists | ||
# uses: actions/download-artifact@v3 | ||
# with: | ||
# name: python-package-distributions | ||
# path: dist/ | ||
# - uses: actions/checkout@v4 | ||
# with: | ||
# fetch-depth: 0 | ||
# github_token: ${{ secrets.ACCESS_TOKEN }} | ||
# token: ${{ secrets.PAT }} | ||
# - name: Python Semantic Release | ||
# id: release | ||
# uses: python-semantic-release/[email protected] | ||
# with: | ||
# github_token: ${{ secrets.ACCESS_TOKEN }} | ||
# <other options here> | ||
- name: Publish package to TestPyPI if new release available | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
if: ${{ [ ! -d "dist" ] }} | ||
Check failure on line 86 in .github/workflows/release.yaml
|
||
with: | ||
user: __token__ | ||
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
repository-url: https://test.pypi.org/legacy/ | ||
# - name: Publish package to GitHub Release | ||
# uses: python-semantic-release/upload-to-gh-release@main | ||
# if: ${{ steps.release.outputs.released }} == 'true' | ||
# with: | ||
# github_token: ${{ secrets.ACCESS_TOKEN }} | ||
# token: ${{ secrets.PAT }} | ||
# tag: ${{ steps.release.outputs.tag }} | ||
# steps: | ||
# - name: Download all the dists | ||
# uses: actions/download-artifact@v3 | ||
# with: | ||
# name: python-package-distributions | ||
# path: dist/ | ||
# - name: Prepare package for release | ||
# env: | ||
# GH_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
# run: semantic-release publish | ||
# - name: Publish distribution 📦 to TestPyPI | ||
# uses: pypa/gh-action-pypi-publish@release/v1 | ||
# with: | ||
# user: __token__ | ||
# password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
# repository-url: https://test.pypi.org/legacy/ |