Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
nisaji committed Dec 28, 2024
1 parent f052879 commit 0acf716
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,3 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

- name: Update repository description
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh repo edit --homepage "https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}"
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,13 @@ jobs:
- name: Install validation dependencies
run: pip install tomli

- name: Validate versions
run: python scripts/validate_versions.py
- name: Check version exists on PyPI
run: |
VERSION=$(poetry version -s)
if pip install langrade==$VERSION 2>/dev/null; then
echo "Version $VERSION already exists on PyPI"
exit 1
fi
- name: Build and publish
run: poetry publish --build
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,15 @@ jobs:
current_version=$(poetry version -s)
poetry version patch
new_version=$(poetry version -s)
sed -i "s/version=\"${current_version}\"/version=\"${new_version}\"/" setup.py
- name: Validate versions
run: python scripts/validate_versions.py ${{ steps.current_version.outputs.version }}

- name: Commit and tag
run: |
new_version=$(poetry version -s)
git add pyproject.toml setup.py
git commit -m "Bump version from ${current_version} to ${new_version}"
git add pyproject.toml
git commit -m "Bump version to ${new_version}"
git tag -a "v${new_version}" -m "Release v${new_version}"
git push
git push --tags
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ htmlcov/
.DS_Store
Thumbs.db

# build
site/

# Other
create_txt.py
file_structure_and_contents.txt
Expand Down

0 comments on commit 0acf716

Please sign in to comment.