Skip to content

Commit

Permalink
Add build CI step
Browse files Browse the repository at this point in the history
  • Loading branch information
nevillelyh committed Jan 6, 2025
1 parent e353e3a commit 66cb75d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,24 @@ jobs:
- uses: astral-sh/setup-uv@v3
- run: ./script/init.sh
- run: ./script/test.sh python

release:
name: Release
needs:
- test-go
- test-go-legacy-cog
- test-python
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v3
- run: ./script/init.sh
- run: ./script/build.sh
- uses: softprops/action-gh-release@v2
with:
files: dist/*
6 changes: 4 additions & 2 deletions script/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ set -euo pipefail
base_dir="$(git rev-parse --show-toplevel)"

cd "$base_dir"
python -m build
rm -rf dist
.venv/bin/python3 -m build -w
mv dist/coglet-*-py3-none-any.whl dist/coglet-py3-none-any.whl

# Export Python version to Go
python -c 'import coglet; print(coglet.__version__)' > internal/util/version.txt
.venv/bin/python3 -c 'import coglet; print(coglet.__version__)' > internal/util/version.txt

for os in darwin linux; do
for arch in amd64 arm64; do
Expand Down

0 comments on commit 66cb75d

Please sign in to comment.