diff --git a/.github/workflows/release_python.yml b/.github/workflows/release_python.yml index 928288a4..02284968 100644 --- a/.github/workflows/release_python.yml +++ b/.github/workflows/release_python.yml @@ -6,11 +6,19 @@ on: python_version: required: true type: string + beta: + required: false + type: boolean + default: false workflow_call: inputs: python_version: required: true type: string + beta: + required: false + type: boolean + default: false jobs: build: @@ -40,7 +48,7 @@ jobs: - name: Pick tag run: | - echo "SELECTED_TAG=$(./scripts/pick_semver.sh ${{ inputs.python_version }})" >> $GITHUB_ENV + echo "SELECTED_TAG=$(./scripts/pick_semver.sh ${{ inputs.python_version }} ${{ inputs.beta }})" >> $GITHUB_ENV - name: Release uses: softprops/action-gh-release@v1 @@ -48,3 +56,4 @@ jobs: files: /tmp/python/python*.zip tag_name: ${{ env.SELECTED_TAG }} body: "Python ${{ inputs.python_version }}" + prerelease: ${{ inputs.beta }} diff --git a/scripts/build_windows.sh b/scripts/build_windows.sh index a1b51ce3..31196580 100755 --- a/scripts/build_windows.sh +++ b/scripts/build_windows.sh @@ -161,6 +161,9 @@ cd ${WORKDIR} # Need to bundle openssl with the executable cp deps/openssl/bin/*.dll python-install/bin +# Need to bundle vcredist +cp /c/WINDOWS/SYSTEM32/VCRUNTIME140.dll python-install/bin + echo "::endgroup::" ############### # Test python # diff --git a/scripts/pick_semver.sh b/scripts/pick_semver.sh index e4fbceab..5d98bcf4 100755 --- a/scripts/pick_semver.sh +++ b/scripts/pick_semver.sh @@ -1,20 +1,27 @@ #!/bin/bash python_version=$1 +beta=$2 -tags=$(git tag | grep $python_version) + +suffix=build +if [[ "$beta" == "true" ]]; then + suffix=beta +fi + +tags=$(git tag | grep "$python_version-$suffix") if [[ -z "$tags" ]]; then - echo "v$python_version-build.0" + echo "v$python_version-$suffix.0" exit 0 fi most_recent=0 while read tag; do - tag_postfix=$(echo $tag | sed "s/^v$python_version-build\.//") + tag_postfix=$(echo $tag | sed "s/^v$python_version-$suffix\.//") if [ "$tag_postfix" -gt "$most_recent" ]; then most_recent=$tag_postfix fi done <<< "$tags" -echo "v$python_version-build.$(expr $most_recent + 1)" \ No newline at end of file +echo "v$python_version-$suffix.$(expr $most_recent + 1)" \ No newline at end of file