Skip to content

Commit

Permalink
refactor, remove RC
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinjqliu committed Feb 6, 2025
1 parent 62a0072 commit 9ecc1ff
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 23 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/nightly-pypi-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.set-version.outputs.VERSION }}
RC: ${{ steps.set-version.outputs.RC }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -43,23 +42,21 @@ jobs:
- name: Install Poetry
run: make install-poetry

- name: Extract version and rc
- name: Set version
id: set-version
run: |
VERSION=$(poetry version --short)
RC="$(date +%Y%m%d)"
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
echo "RC=$RC" >> "$GITHUB_OUTPUT"
CURRENT_VERSION=$(poetry version --short)
TIMESTAMP=$(date +%Y%m%d%H%M%S)
echo "VERSION=${CURRENT_VERSION}.dev${TIMESTAMP}" >> "$GITHUB_ENV"
- name: Debug version and rc
run: echo "Publishing version ${{ steps.set-version.outputs.VERSION }}rc${{ steps.set-version.outputs.RC }}"
- name: Debug version
run: echo "Publishing version ${{ steps.set-version.outputs.VERSION }}"

nightly-build:
needs: set-version
uses: ./.github/workflows/pypi-build-artifacts.yml
with:
version: ${{ needs.set-version.outputs.VERSION }} # i.e. 0.9.0
rc: ${{ needs.set-version.outputs.RC }} # i.e. 20250203

testpypi-publish:
name: Publish to TestPypi
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/pypi-build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ on:
VERSION:
required: true
type: string
RC:
required: true
type: string

jobs:
pypi-build-artifacts:
Expand Down Expand Up @@ -56,8 +53,7 @@ jobs:
- name: Set version with RC
env:
VERSION: ${{ inputs.VERSION }}
RC: ${{ inputs.RC }}
run: python -m poetry version "${{ env.VERSION }}rc${{ env.RC }}" # e.g., 0.8.0rc1
run: python -m poetry version "${{ env.VERSION }}

# Publish the source distribution with the version that's in
# the repository, otherwise the tests will fail
Expand Down Expand Up @@ -97,6 +93,6 @@ jobs:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: "pypi-release-candidate-${{ inputs.VERSION }}rc${{ inputs.RC }}"
name: "pypi-release-candidate-${{ inputs.VERSION }}
pattern: pypi-release-candidate*
delete-merged: true
6 changes: 2 additions & 4 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ jobs:
- validate-library-version
uses: ./.github/workflows/svn-build-artifacts.yml
with:
version: ${{ needs.validate-inputs.outputs.VERSION }}
rc: ${{ needs.validate-inputs.outputs.RC }}
version: ${{ needs.validate-inputs.outputs.VERSION }}rc${{ needs.validate-inputs.outputs.RC }}

# PyPi
pypi-build-artifacts:
Expand All @@ -131,5 +130,4 @@ jobs:
- validate-library-version
uses: ./.github/workflows/pypi-build-artifacts.yml
with:
version: ${{ needs.validate-inputs.outputs.VERSION }}
rc: ${{ needs.validate-inputs.outputs.RC }}
version: ${{ needs.validate-inputs.outputs.VERSION }}rc${{ needs.validate-inputs.outputs.RC }}
5 changes: 1 addition & 4 deletions .github/workflows/svn-build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ on:
VERSION:
required: true
type: string
RC:
required: true
type: string

jobs:
svn-build-artifacts:
Expand Down Expand Up @@ -91,6 +88,6 @@ jobs:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: "svn-release-candidate-${{ inputs.VERSION }}rc${{ inputs.RC }}"
name: "svn-release-candidate-${{ inputs.VERSION }}
pattern: svn-release-candidate*
delete-merged: true

0 comments on commit 9ecc1ff

Please sign in to comment.