@@ -18,13 +18,13 @@ jobs:
1818 runs-on : ubuntu-latest
1919 permissions :
2020 contents : write
21- id-token : write # For PyPI trusted publishing
21+ id-token : write # For PyPI trusted publishing
2222
2323 steps :
2424 - name : Checkout code
2525 uses : actions/checkout@v4
2626 with :
27- fetch-depth : 0 # Full history for proper tagging
27+ fetch-depth : 0 # Full history for proper tagging
2828 token : ${{ secrets.GITHUB_TOKEN }}
2929
3030 - name : Install uv
@@ -55,13 +55,13 @@ jobs:
5555 run : |
5656 CURRENT_VERSION="${{ steps.current_version.outputs.version }}"
5757 VERSION_TYPE="${{ github.event.inputs.version_type }}"
58-
58+
5959 # Split version into parts
6060 IFS='.' read -ra VERSION_PARTS <<< "$CURRENT_VERSION"
6161 MAJOR=${VERSION_PARTS[0]}
6262 MINOR=${VERSION_PARTS[1]}
6363 PATCH=${VERSION_PARTS[2]}
64-
64+
6565 # Increment based on type
6666 if [ "$VERSION_TYPE" = "major" ]; then
6767 MAJOR=$((MAJOR + 1))
7373 else
7474 PATCH=$((PATCH + 1))
7575 fi
76-
76+
7777 NEW_VERSION="$MAJOR.$MINOR.$PATCH"
7878 echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
7979 echo "New version: $NEW_VERSION"
8282 run : |
8383 NEW_VERSION="${{ steps.new_version.outputs.version }}"
8484 sed -i "s/^version = .*/version = \"$NEW_VERSION\"/" pyproject.toml
85-
85+
8686 # Also update version in main.py if it exists
8787 if grep -q "version=" ahn_cli/main.py; then
8888 sed -i "s/@click.version_option(version=\".*\"/@click.version_option(version=\"$NEW_VERSION\"/" ahn_cli/main.py
@@ -103,7 +103,7 @@ jobs:
103103
104104 - name : Publish to PyPI
105105 env :
106- UV_PUBLISH_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
106+ UV_PUBLISH_TOKEN : ${{ secrets.PYPI_TOKEN }}
107107 run : |
108108 uv publish
109109
@@ -117,27 +117,27 @@ jobs:
117117 else
118118 COMMITS=$(git log --pretty=format:"- %s" "$LAST_TAG"..HEAD)
119119 fi
120-
120+
121121 # Create release notes
122122 cat > release_notes.md << EOF
123123 ## What's Changed
124-
124+
125125 ### Version bump: ${{ steps.current_version.outputs.version }} → ${{ steps.new_version.outputs.version }}
126-
126+
127127 ### Commits
128128 $COMMITS
129-
129+
130130 ### Installation
131131 \`\`\`bash
132132 pip install ahn_cli==${{ steps.new_version.outputs.version }}
133133 \`\`\`
134-
134+
135135 Or with uv:
136136 \`\`\`bash
137137 uv tool install ahn_cli==${{ steps.new_version.outputs.version }}
138138 \`\`\`
139139 EOF
140-
140+
141141 # Set output
142142 echo "notes<<EOF" >> $GITHUB_OUTPUT
143143 cat release_notes.md >> $GITHUB_OUTPUT
@@ -152,4 +152,4 @@ jobs:
152152 draft : false
153153 prerelease : false
154154 files : |
155- dist/*
155+ dist/*
0 commit comments