Skip to content

Commit

Permalink
Add action to set version numbers on release
Browse files Browse the repository at this point in the history
  • Loading branch information
BenGalewsky committed Aug 10, 2021
1 parent f8aac10 commit 31466a4
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Push to PyPI

on:
release:
types: [released, prereleased]

jobs:
publish-sdk:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip build
- name: Set the funcx version
env:
funcx_version: ${{ github.ref }}
run: |
sed "s/__version__ *= *\".*\"/__version__ = \"$funcx_version\"/" funcx_sdk/funcx/sdk/version.py > funcx_sdk/funcx/sdk/version.py
sed "s/__version__ *= *\".*\"/__version__ = \"$funcx_version\"/" funcx_endpoint/funcx_endpoint/version.py > funcx_endpoint/funcx_endpoint/version.py
- name: Push updated version to branch
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Bump version
- name: Build the sdk
run: |
cd funcx_sdk
python -m build --sdist --wheel
- name: Build the endpoint
run: |
cd funcx_endpoint
python -m build --sdist --wheel

0 comments on commit 31466a4

Please sign in to comment.