Skip to content

Commit

Permalink
feature: updated version and workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
efraespada committed Nov 9, 2024
1 parent e67c66a commit 6d58933
Showing 1 changed file with 104 additions and 86 deletions.
190 changes: 104 additions & 86 deletions .github/workflows/push_checks_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,40 +49,47 @@ jobs:
run: flutter analyze

- name: Handle job completion
shell: cmd
if: always()
shell: cmd
env:
CHAT_ID: ${{ secrets.CHAT_ID }}
CHAT_KEY: ${{ secrets.CHAT_KEY }}
REPO: ${{ github.repository }}
VERSION: ${{ env.VERSION }}
JOB_STATUS: ${{ job.status }}
run: |
if [ "${{ job.status }}" == "failure" ]; then
landa-messenger-api chat-send \
--id "${{ secrets.CHAT_ID }}" \
--api_key "${{ secrets.CHAT_KEY }}" \
--title "🔴 Analyze - Windows Failed" \
--body "${{ github.repository }}: v${{ env.VERSION }}" \
--url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" \
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
--background_color "#55000000" \
echo The VERSION is: %VERSION%
if "%JOB_STATUS%" == "failure" (
landa-messenger-api chat-send ^
--id "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "🔴 Analyze - Windows Failed" ^
--body "%REPO%: v%VERSION%" ^
--url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" ^
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" ^
--background_color "#55000000" ^
--text_color "#FFFFFFFF"
elif [ "${{ job.status }}" == "cancelled" ]; then
landa-messenger-api chat-send \
--id "${{ secrets.CHAT_ID }}" \
--api_key "${{ secrets.CHAT_KEY }}" \
--title "🟠 Analyze - Windows Canceled" \
--body "${{ github.repository }}: v${{ env.VERSION }}" \
--url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" \
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
--background_color "#55000000" \
) else if "%JOB_STATUS%" == "cancelled" (
landa-messenger-api chat-send ^
--id "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "🟠 Analyze - Windows Canceled" ^
--body "%REPO%: v%VERSION%" ^
--url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" ^
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" ^
--background_color "#55000000" ^
--text_color "#FFFFFFFF"
else
landa-messenger-api chat-send \
--id "${{ secrets.CHAT_ID }}" \
--api_key "${{ secrets.CHAT_KEY }}" \
--title "🟢 Analyze - Windows Passed" \
--body "${{ github.repository }}: v${{ env.VERSION }}" \
--url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" \
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
--background_color "#55000000" \
) else (
landa-messenger-api chat-send ^
--id "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "🟢 Analyze - Windows Passed" ^
--body "%REPO%: v%VERSION%" ^
--url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" ^
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" ^
--background_color "#55000000" ^
--text_color "#FFFFFFFF"
fi
)
check_windows_test:
name: Test Windows
runs-on: [self-hosted, Windows]
Expand Down Expand Up @@ -119,39 +126,44 @@ jobs:
- name: Handle job completion
if: always()
shell: cmd
env:
CHAT_ID: ${{ secrets.CHAT_ID }}
CHAT_KEY: ${{ secrets.CHAT_KEY }}
REPO: ${{ github.repository }}
VERSION: ${{ env.VERSION }}
JOB_STATUS: ${{ job.status }}
run: |
if [ "${{ job.status }}" == "failure" ]; then
landa-messenger-api chat-send \
--id "${{ secrets.CHAT_ID }}" \
--api_key "${{ secrets.CHAT_KEY }}" \
--title "🔴 Test - Windows Failed" \
--body "${{ github.repository }}: v${{ env.VERSION }}" \
--url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" \
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
--background_color "#55000000" \
if "%JOB_STATUS%" == "failure" (
landa-messenger-api chat-send ^
--id "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "🔴 Test - Windows Failed" ^
--body "%REPO%: v%VERSION%" ^
--url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" ^
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" ^
--background_color "#55000000" ^
--text_color "#FFFFFFFF"
elif [ "${{ job.status }}" == "cancelled" ]; then
landa-messenger-api chat-send \
--id "${{ secrets.CHAT_ID }}" \
--api_key "${{ secrets.CHAT_KEY }}" \
--title "🟠 Test - Windows Canceled" \
--body "${{ github.repository }}: v${{ env.VERSION }}" \
--url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" \
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
--background_color "#55000000" \
) else if "%JOB_STATUS%" == "cancelled" (
landa-messenger-api chat-send ^
--id "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "🟠 Test - Windows Canceled" ^
--body "%REPO%: v%VERSION%" ^
--url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" ^
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" ^
--background_color "#55000000" ^
--text_color "#FFFFFFFF"
else
landa-messenger-api chat-send \
--id "${{ secrets.CHAT_ID }}" \
--api_key "${{ secrets.CHAT_KEY }}" \
--title "🟢 Test - Windows Passed" \
--body "${{ github.repository }}: v${{ env.VERSION }}" \
--url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" \
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
--background_color "#55000000" \
) else (
landa-messenger-api chat-send ^
--id "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "🟢 Test - Windows Passed" ^
--body "%REPO%: v%VERSION%" ^
--url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" ^
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" ^
--background_color "#55000000" ^
--text_color "#FFFFFFFF"
fi
)
check_windows_publish_dry_run:
name: Dry Run Publish Windows
runs-on: [self-hosted, Windows]
Expand Down Expand Up @@ -188,35 +200,41 @@ jobs:
- name: Handle job completion
if: always()
shell: cmd
env:
CHAT_ID: ${{ secrets.CHAT_ID }}
CHAT_KEY: ${{ secrets.CHAT_KEY }}
REPO: ${{ github.repository }}
VERSION: ${{ env.VERSION }}
JOB_STATUS: ${{ job.status }}
run: |
if [ "${{ job.status }}" == "failure" ]; then
landa-messenger-api chat-send \
--id "${{ secrets.CHAT_ID }}" \
--api_key "${{ secrets.CHAT_KEY }}" \
--title "🔴 Dry Run Publish - Windows Failed" \
--body "${{ github.repository }}: v${{ env.VERSION }}" \
--url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" \
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
--background_color "#55000000" \
if "%JOB_STATUS%" == "failure" (
landa-messenger-api chat-send ^
--id "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "🔴 Dry Run Publish - Windows Failed" ^
--body "%REPO%: v%VERSION%" ^
--url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" ^
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" ^
--background_color "#55000000" ^
--text_color "#FFFFFFFF"
elif [ "${{ job.status }}" == "cancelled" ]; then
landa-messenger-api chat-send \
--id "${{ secrets.CHAT_ID }}" \
--api_key "${{ secrets.CHAT_KEY }}" \
--title "🟠 Dry Run Publish - Windows Canceled" \
--body "${{ github.repository }}: v${{ env.VERSION }}" \
--url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" \
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
--background_color "#55000000" \
) else if "%JOB_STATUS%" == "cancelled" (
landa-messenger-api chat-send ^
--id "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "🟠 Dry Run Publish - Windows Canceled" ^
--body "%REPO%: v%VERSION%" ^
--url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" ^
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" ^
--background_color "#55000000" ^
--text_color "#FFFFFFFF"
else
landa-messenger-api chat-send \
--id "${{ secrets.CHAT_ID }}" \
--api_key "${{ secrets.CHAT_KEY }}" \
--title "🟢 Dry Run Publish - Windows Passed" \
--body "${{ github.repository }}: v${{ env.VERSION }}" \
--url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" \
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
--background_color "#55000000" \
) else (
landa-messenger-api chat-send ^
--id "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "🟢 Dry Run Publish - Windows Passed" ^
--body "%REPO%: v%VERSION%" ^
--url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" ^
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" ^
--background_color "#55000000" ^
--text_color "#FFFFFFFF"
fi
)

0 comments on commit 6d58933

Please sign in to comment.