Demo full changes

This commit is contained in:
Zanie
2023-09-15 14:54:24 -05:00
parent 1c0c00d22d
commit 500d1b854b

View File

@@ -370,16 +370,27 @@ jobs:
tmp:
runs-on: ubuntu-latest
steps:
- name: "Checkout Branch"
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
ref: main
ref: main # We checkout the main branch to check for the commit
- name: Check main branch
run: |
# Fetch the main branch since a shallow checkout is used by default
git fetch origin main --unshallow
git branch --contains f936d319ccf50b8af873e2dbe0cea7232d34efac
if ! git branch --contains f936d319ccf50b8af873e2dbe0cea7232d34efac | grep -E '(^|\s)main$'; then
if ! git branch --contains 0c030b5bf31e425cb6070db7386243eca6dbd8f1 | grep -E '(^|\s)main$'; then
echo "The specified sha is not on the main branch" >&2
exit 1
fi
- name: Check tag consistency
run: |
# Switch to the commit we want to release
git checkout 0c030b5bf31e425cb6070db7386243eca6dbd8f1
version=$(grep "version = " pyproject.toml | sed -e 's/version = "\(.*\)"/\1/g')
if [ "${{ inputs.tag }}" != "${version}" ]; then
echo "The input tag does not match the version from pyproject.toml:" >&2
echo "${{ inputs.tag }}" >&2
echo "${version}" >&2
exit 1
else
echo "Releasing ${version}"
fi