Skip to content

Commit

Permalink
Move update version steps into separate composite action; label unopt…
Browse files Browse the repository at this point in the history
…imized builds
  • Loading branch information
juliannguyen4 committed Feb 20, 2024
1 parent 877debe commit 5feadd0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,16 @@ jobs:
if: ${{ !inputs.run_tests }}
run: echo "TEST_COMMAND=python -c 'import aerospike'" >> $GITHUB_ENV

- name: Get current version if building a debug wheel
if: ${{ inputs.build-for-debugging }}
run: echo DEBUG_VERSION="$(cat VERSION)+unoptimized" >> $GITHUB_ENV

- name: Label version for debugging
if: ${{ inputs.build-for-debugging }}
uses: ./.github/actions/update-version
with:
new_version: ${{ env.DEBUG_VERSION }}

- name: Build without optimizations
if: ${{ inputs.build-for-debugging }}
run: echo "CIBW_ENVIRONMENT_PASS_LINUX_VARS='UNOPTIMIZED=1'" >> $GITHUB_ENV
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ jobs:
token: ${{ secrets.CLIENT_BOT_PAT }}
ref: ${{ inputs.ref }}

- name: Update __version__ in aerospike module
run: sed -i "s/const char version\[] = \".*\";/const char version\[] = \"${{ inputs.new_version }}\";/" src/main/aerospike.c

- name: Update VERSION metadata
run: echo ${{ inputs.new_version }} > VERSION
- name: Update version in repo
uses: .github/action/update-version
with:
new_version: ${{ inputs.new_version }}

- name: Commit new version
uses: stefanzweifel/git-auto-commit-action@v4
Expand Down

0 comments on commit 5feadd0

Please sign in to comment.