1- name : Publish Casp CLI to PyPI
2-
3- on :
4- release :
5- types : [published]
6-
7- jobs :
8- publish-pypi :
9- name : Build and Publish CLI
10- runs-on : ubuntu-latest
11- permissions :
12- contents : read
13- steps :
14- - uses : actions/checkout@v4
15- with :
16- fetch-depth : 0
17-
18- - name : Check for changes in cli/casp
19- id : check_changes
20- run : |
21- PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || true)
22-
23- if [ -z "$PREV_TAG" ]; then
24- echo "No previous tag found (likely first release). Publishing..."
25- echo "changed=true" >> "$GITHUB_OUTPUT"
26- else
27- echo "Previous release tag found: $PREV_TAG"
1+ # name: Publish Casp CLI to PyPI
2+
3+ # on:
4+ # release:
5+ # types: [published]
6+
7+ # jobs:
8+ # publish-pypi:
9+ # name: Build and Publish CLI
10+ # runs-on: ubuntu-latest
11+ # permissions:
12+ # contents: read
13+ # steps:
14+ # - uses: actions/checkout@v4
15+ # with:
16+ # fetch-depth: 0
17+
18+ # - name: Check for changes in cli/casp
19+ # id: check_changes
20+ # run: |
21+ # PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || true)
22+
23+ # if [ -z "$PREV_TAG" ]; then
24+ # echo "No previous tag found (likely first release). Publishing..."
25+ # echo "changed=true" >> "$GITHUB_OUTPUT"
26+ # else
27+ # echo "Previous release tag found: $PREV_TAG"
2828
29- if git diff --quiet "$PREV_TAG" HEAD -- cli/casp; then
30- echo "No changes detected in cli/casp."
31- echo "changed=false" >> "$GITHUB_OUTPUT"
32- else
33- echo "Changes detected in cli/casp."
34- echo "changed=true" >> "$GITHUB_OUTPUT"
35- fi
36- fi
37-
38- - name : Set up Python
39- if : steps.check_changes.outputs.changed == 'true'
40- uses : actions/setup-python@v4
41- with :
42- python-version : ' 3.11'
43-
44- - name : Install build dependencies
45- if : steps.check_changes.outputs.changed == 'true'
46- run : python -m pip install build --user
47-
48- - name : Build package
49- if : steps.check_changes.outputs.changed == 'true'
50- working-directory : cli/casp
51- run : python -m build
52-
53- - name : Publish to PyPI
54- if : steps.check_changes.outputs.changed == 'true'
55- uses : pypa/gh-action-pypi-publish@release/v1
56- with :
57- password : ${{ secrets.PYPI_API_TOKEN }}
58- packages_dir : cli/casp/dist/
59- skip_existing : true
29+ # if git diff --quiet "$PREV_TAG" HEAD -- cli/casp; then
30+ # echo "No changes detected in cli/casp."
31+ # echo "changed=false" >> "$GITHUB_OUTPUT"
32+ # else
33+ # echo "Changes detected in cli/casp."
34+ # echo "changed=true" >> "$GITHUB_OUTPUT"
35+ # fi
36+ # fi
37+
38+ # - name: Set up Python
39+ # if: steps.check_changes.outputs.changed == 'true'
40+ # uses: actions/setup-python@v4
41+ # with:
42+ # python-version: '3.11'
43+
44+ # - name: Install build dependencies
45+ # if: steps.check_changes.outputs.changed == 'true'
46+ # run: python -m pip install build --user
47+
48+ # - name: Build package
49+ # if: steps.check_changes.outputs.changed == 'true'
50+ # working-directory: cli/casp
51+ # run: python -m build
52+
53+ # - name: Publish to PyPI
54+ # if: steps.check_changes.outputs.changed == 'true'
55+ # uses: pypa/gh-action-pypi-publish@release/v1
56+ # with:
57+ # password: ${{ secrets.PYPI_API_TOKEN }}
58+ # packages_dir: cli/casp/dist/
59+ # skip_existing: true
0 commit comments