Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
iameskild authored Sep 28, 2023
1 parent 046b631 commit 43b8363
Showing 1 changed file with 7 additions and 25 deletions.
32 changes: 7 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,15 @@ jobs:
run: python -m pip install --upgrade pip build

- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
fetch-depth: 0

# Ensure the last tag created is used
- name: Set VERSION_TAG
run: |
response=$(curl --silent "https://api.github.com/repos/$GITHUB_REPOSITORY/releases")
latest_date=""
latest_release=""
length=$(echo "$response" | jq '. | length')
for (( i=0; i<length; i++ )); do
current_date=$(echo "$response" | jq -r ".[$i].created_at")
if [[ "$current_date" > "$latest_date" ]]; then
latest_date="$current_date"
latest_release=$(echo "$response" | jq -r ".[$i]")
fi
done
VERSION_TAG=$(echo "$latest_release" | jq -r '.tag_name')
echo "VERSION_TAG=$(echo $VERSION_TAG)" >> $GITHUB_ENV
- name: Print VERSION_TAG
- name: Create tag
# if present, remove leading `v`
run: |
echo "VERSION_TAG=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV
echo ${{ env.VERSION_TAG }}
- name: Build source and binary
run: python -m build --sdist --wheel .

Expand All @@ -65,10 +48,9 @@ jobs:
pip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple \
argo-jupyter-scheduler==${{ env.VERSION_TAG }}
nebari-workflow-controller==${{ env.VERSION_TAG }}
release-pypi:
name: Publish Argo-Jupyter-Scheduler on PyPi
name: Publish Nebari-Workflow-Controller on PyPi
runs-on: ubuntu-latest
needs: test-pypi
permissions:
Expand All @@ -85,7 +67,7 @@ jobs:
run: python -m pip install --upgrade pip build

- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down

0 comments on commit 43b8363

Please sign in to comment.