mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-12-01 03:18:11 +03:00
Fixing TAG_TYPE env for CI (#16442)
This commit is contained in:
parent
04fa3b3780
commit
2ffd471f99
@ -83,15 +83,16 @@ jobs:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Check tag type
|
||||
id: check_tag_type
|
||||
shell: bash
|
||||
run: |
|
||||
REG_B="^[0-9]+\.[0-9]+\.[0-9]+-b[0-9]+$"
|
||||
REG_RC="^[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+$"
|
||||
if [[ "${{ github.event.release.tag_name }}" =~ $REG_B ]] || [[ "${{ inputs.release_type }}" =~ $REG_B ]]; then
|
||||
echo "TAG_TYPE=beta" >> "$GITHUB_OUTPUT"
|
||||
echo "TAG_TYPE=beta"
|
||||
echo "TAG_TYPE=beta" >> "$GITHUB_ENV"
|
||||
elif [[ "${{ github.event.release.tag_name }}" =~ $REG_RC ]] || [[ "${{ inputs.release_type }}" =~ $REG_RC ]]; then
|
||||
echo "TAG_TYPE=rc" >> "$GITHUB_OUTPUT"
|
||||
echo "TAG_TYPE=rc"
|
||||
echo "TAG_TYPE=rc" >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
# Create our own venv outside of the git directory JUST for getting the ACTUAL version so that install can't break it
|
||||
@ -142,7 +143,7 @@ jobs:
|
||||
LATEST_RC=$(gh api repos/Chia-Network/bladebit/releases --jq 'map(select(.prerelease) | select(.tag_name | test("^v[0-9]+\\.[0-9]+\\.[0-9]+-rc[0-9]+$"))) | first | .tag_name')
|
||||
|
||||
# Compare the versions and choose the newest that matches the requirements
|
||||
if [[ "$TAG_TYPE" == "beta" || -z "${{ github.event.release.tag_name }}" ]]; then
|
||||
if [[ "$TAG_TYPE" == "beta" || -z "$TAG_TYPE" ]]; then
|
||||
# For beta or dev builds (indicated by the absence of a tag), use the latest version available
|
||||
LATEST_VERSION=$(printf "%s\n%s\n%s\n" "$LATEST_RELEASE" "$LATEST_BETA" "$LATEST_RC" | sed '/-/!s/$/_/' | sort -V | sed 's/_$//' | tail -n 1)
|
||||
elif [[ "$TAG_TYPE" == "rc" ]]; then
|
||||
|
@ -71,15 +71,16 @@ jobs:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Check tag type
|
||||
id: check_tag_type
|
||||
shell: bash
|
||||
run: |
|
||||
REG_B="^[0-9]+\.[0-9]+\.[0-9]+-b[0-9]+$"
|
||||
REG_RC="^[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+$"
|
||||
if [[ "${{ github.event.release.tag_name }}" =~ $REG_B ]] || [[ "${{ inputs.release_type }}" =~ $REG_B ]]; then
|
||||
echo "TAG_TYPE=beta" >> "$GITHUB_OUTPUT"
|
||||
echo "TAG_TYPE=beta"
|
||||
echo "TAG_TYPE=beta" >> "$GITHUB_ENV"
|
||||
elif [[ "${{ github.event.release.tag_name }}" =~ $REG_RC ]] || [[ "${{ inputs.release_type }}" =~ $REG_RC ]]; then
|
||||
echo "TAG_TYPE=rc" >> "$GITHUB_OUTPUT"
|
||||
echo "TAG_TYPE=rc"
|
||||
echo "TAG_TYPE=rc" >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
- uses: Chia-Network/actions/enforce-semver@main
|
||||
@ -133,7 +134,7 @@ jobs:
|
||||
LATEST_RC=$(gh api repos/Chia-Network/bladebit/releases --jq 'map(select(.prerelease) | select(.tag_name | test("^v[0-9]+\\.[0-9]+\\.[0-9]+-rc[0-9]+$"))) | first | .tag_name')
|
||||
|
||||
# Compare the versions and choose the newest that matches the requirements
|
||||
if [[ "$TAG_TYPE" == "beta" || -z "${{ github.event.release.tag_name }}" ]]; then
|
||||
if [[ "$TAG_TYPE" == "beta" || -z "$TAG_TYPE" ]]; then
|
||||
# For beta or dev builds (indicated by the absence of a tag), use the latest version available
|
||||
LATEST_VERSION=$(printf "%s\n%s\n%s\n" "$LATEST_RELEASE" "$LATEST_BETA" "$LATEST_RC" | sed '/-/!s/$/_/' | sort -V | sed 's/_$//' | tail -n 1)
|
||||
elif [[ "$TAG_TYPE" == "rc" ]]; then
|
||||
|
9
.github/workflows/build-macos-installers.yml
vendored
9
.github/workflows/build-macos-installers.yml
vendored
@ -82,15 +82,16 @@ jobs:
|
||||
MACOSX_DEPLOYMENT_TARGET: 11
|
||||
|
||||
- name: Check tag type
|
||||
id: check_tag_type
|
||||
shell: bash
|
||||
run: |
|
||||
REG_B="^[0-9]+\.[0-9]+\.[0-9]+-b[0-9]+$"
|
||||
REG_RC="^[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+$"
|
||||
if [[ "${{ github.event.release.tag_name }}" =~ $REG_B ]] || [[ "${{ inputs.release_type }}" =~ $REG_B ]]; then
|
||||
echo "TAG_TYPE=beta" >> "$GITHUB_OUTPUT"
|
||||
echo "TAG_TYPE=beta"
|
||||
echo "TAG_TYPE=beta" >> "$GITHUB_ENV"
|
||||
elif [[ "${{ github.event.release.tag_name }}" =~ $REG_RC ]] || [[ "${{ inputs.release_type }}" =~ $REG_RC ]]; then
|
||||
echo "TAG_TYPE=rc" >> "$GITHUB_OUTPUT"
|
||||
echo "TAG_TYPE=rc"
|
||||
echo "TAG_TYPE=rc" >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
- name: Test for secrets access
|
||||
@ -166,7 +167,7 @@ jobs:
|
||||
LATEST_RC=$(gh api repos/Chia-Network/bladebit/releases --jq 'map(select(.prerelease) | select(.tag_name | test("^v[0-9]+\\.[0-9]+\\.[0-9]+-rc[0-9]+$"))) | first | .tag_name')
|
||||
|
||||
# Compare the versions and choose the newest that matches the requirements
|
||||
if [[ "$TAG_TYPE" == "beta" || -z "${{ github.event.release.tag_name }}" ]]; then
|
||||
if [[ "$TAG_TYPE" == "beta" || -z "$TAG_TYPE" ]]; then
|
||||
# For beta or dev builds (indicated by the absence of a tag), use the latest version available
|
||||
LATEST_VERSION=$(printf "%s\n%s\n%s\n" "$LATEST_RELEASE" "$LATEST_BETA" "$LATEST_RC" | sed '/-/!s/$/_/' | sort -V | sed 's/_$//' | tail -n 1)
|
||||
elif [[ "$TAG_TYPE" == "rc" ]]; then
|
||||
|
@ -60,15 +60,16 @@ jobs:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Check tag type
|
||||
id: check_tag_type
|
||||
shell: bash
|
||||
run: |
|
||||
REG_B="^[0-9]+\.[0-9]+\.[0-9]+-b[0-9]+$"
|
||||
REG_RC="^[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+$"
|
||||
if [[ "${{ github.event.release.tag_name }}" =~ $REG_B ]] || [[ "${{ inputs.release_type }}" =~ $REG_B ]]; then
|
||||
echo "TAG_TYPE=beta" >> "$GITHUB_OUTPUT"
|
||||
echo "TAG_TYPE=beta"
|
||||
echo "TAG_TYPE=beta" >> "$GITHUB_ENV"
|
||||
elif [[ "${{ github.event.release.tag_name }}" =~ $REG_RC ]] || [[ "${{ inputs.release_type }}" =~ $REG_RC ]]; then
|
||||
echo "TAG_TYPE=rc" >> "$GITHUB_OUTPUT"
|
||||
echo "TAG_TYPE=rc"
|
||||
echo "TAG_TYPE=rc" >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
- name: Set git urls to https instead of ssh
|
||||
@ -198,7 +199,7 @@ jobs:
|
||||
LATEST_RC=$(gh api repos/Chia-Network/bladebit/releases --jq 'map(select(.prerelease) | select(.tag_name | test("^v[0-9]+\\.[0-9]+\\.[0-9]+-rc[0-9]+$"))) | first | .tag_name')
|
||||
|
||||
# Compare the versions and choose the newest that matches the requirements
|
||||
if [[ "$TAG_TYPE" == "beta" || -z "${{ github.event.release.tag_name }}" ]]; then
|
||||
if [[ "$TAG_TYPE" == "beta" || -z "$TAG_TYPE" ]]; then
|
||||
# For beta or dev builds (indicated by the absence of a tag), use the latest version available
|
||||
LATEST_VERSION=$(printf "%s\n%s\n%s\n" "$LATEST_RELEASE" "$LATEST_BETA" "$LATEST_RC" | sed '/-/!s/$/_/' | sort -V | sed 's/_$//' | tail -n 1)
|
||||
elif [[ "$TAG_TYPE" == "rc" ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user