forked from Green-Sky/tomato
better github cd
This commit is contained in:
parent
ee87dbc532
commit
b38a1a2507
20
.github/workflows/cd.yml
vendored
20
.github/workflows/cd.yml
vendored
@ -37,10 +37,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
|
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
|
||||||
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
|
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
|
||||||
echo "name=${SHORT_HASH}" >> $GITHUB_OUTPUT
|
echo "name=dev-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
|
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
|
||||||
echo "name=${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
echo "name=dev-${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Compress artifacts
|
- name: Compress artifacts
|
||||||
@ -88,10 +88,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
|
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
|
||||||
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
|
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
|
||||||
echo "name=${SHORT_HASH}" >> $GITHUB_OUTPUT
|
echo "name=dev-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
|
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
|
||||||
echo "name=${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
echo "name=dev-${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Compress artifacts
|
- name: Compress artifacts
|
||||||
@ -139,10 +139,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
|
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
|
||||||
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
|
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
|
||||||
echo "name=${SHORT_HASH}" >> $GITHUB_OUTPUT
|
echo "name=dev-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
|
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
|
||||||
echo "name=${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
echo "name=dev-${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Compress artifacts
|
- name: Compress artifacts
|
||||||
@ -183,10 +183,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
|
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
|
||||||
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
|
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
|
||||||
echo "name=${SHORT_HASH}" >> $GITHUB_OUTPUT
|
echo "name=dev-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
|
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
|
||||||
echo "name=${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
echo "name=dev-${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
@ -203,8 +203,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
gh release create "$tag" \
|
gh release create "$tag" \
|
||||||
--repo="$GITHUB_REPOSITORY" \
|
--repo="$GITHUB_REPOSITORY" \
|
||||||
--title="nightly ${tag#v}" \
|
--title="${tag#v}" \
|
||||||
--notes="nightly build" \
|
--notes="preview build of the latest commit" \
|
||||||
--prerelease
|
--prerelease
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
|
Loading…
Reference in New Issue
Block a user