Skip to content

Commit

Permalink
add github actions to sync and release wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
jiashenC committed Sep 17, 2023
1 parent 9ab2369 commit 06a64bb
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release

on:
push:
branches:
- master

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create pypirc.
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
cat > ~/.pypirc <<EOL
[distutils]
index-servers =
pypi
[pypi]
repository = https://upload.pypi.org/legacy/
username = ${PYPI_USERNAME}
password = ${PYPI_PASSWORD}
EOL
- name: Release.
env:
GITHUB_KEY: ${{ github.token }}
run: |
python script/releasing/releaser.py -n minor -u
26 changes: 26 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Sync Staging and Master

on:
push:
branches:
- staging
paths:
- evadb/version.py

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check revision version.
run: |
cmd=$(python -c "from evadb.version import _REVISION; print(_REVISION if 'dev' not in _REVISION else 'skip')")
- name: Sync master and staging.
run: |
if [[ "$cmd" != "skip" ]]; then
git_hash=$(git rev-parse --short "${{ github.sha }}")
git checkout master
git reset --hard $git_hash
git push -f origin master
fi

0 comments on commit 06a64bb

Please sign in to comment.