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 8, 2024
1 parent ef6e1d5 commit ad613cd
Showing 1 changed file with 75 additions and 33 deletions.
108 changes: 75 additions & 33 deletions .github/workflows/push_checks_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ jobs:
shell: cmd
run: npm install -g @landamessenger/landa-messenger-api

- name: Read version from pubspec.yaml
working-directory: zstandard_platform_interface
id: read_version
shell: cmd
run: |
for /f "tokens=2 delims= " %%a in ('findstr "^version: " pubspec.yaml') do set VERSION=%%a
echo VERSION=%VERSION% >> %GITHUB_ENV%
- name: Get dependencies
working-directory: zstandard_windows
shell: cmd
Expand All @@ -42,33 +50,39 @@ 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" (
if "%JOB_STATUS%" == "failure" (
landa-messenger-api chat-send ^
--id "%{{ secrets.CHAT_ID }}" ^
--api_key "%{{ secrets.CHAT_KEY }}" ^
--id "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "🔴 Analyze - Windows Failed" ^
--body "%{{ github.repository }}: Tag v%{{ env.VERSION }}" ^
--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 if "%{{ job.status }}" == "cancelled" (
) else if "%JOB_STATUS%" == "cancelled" (
landa-messenger-api chat-send ^
--id "%{{ secrets.CHAT_ID }}" ^
--api_key "%{{ secrets.CHAT_KEY }}" ^
--id "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "🟠 Analyze - Windows Canceled" ^
--body "%{{ github.repository }}: Tag v%{{ env.VERSION }}" ^
--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 }}" ^
--id "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "🟢 Analyze - Windows Passed" ^
--body "%{{ github.repository }}: Tag v%{{ env.VERSION }}" ^
--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" ^
Expand All @@ -89,6 +103,14 @@ jobs:
shell: cmd
run: npm install -g @landamessenger/landa-messenger-api

- name: Read version from pubspec.yaml
working-directory: zstandard_platform_interface
id: read_version
shell: cmd
run: |
for /f "tokens=2 delims= " %%a in ('findstr "^version: " pubspec.yaml') do set VERSION=%%a
echo VERSION=%VERSION% >> %GITHUB_ENV%
- name: Get dependencies
working-directory: zstandard_windows
shell: cmd
Expand All @@ -102,33 +124,39 @@ 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" (
if "%JOB_STATUS%" == "failure" (
landa-messenger-api chat-send ^
--id "%{{ secrets.CHAT_ID }}" ^
--api_key "%{{ secrets.CHAT_KEY }}" ^
--id "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "🔴 Test - Windows Failed" ^
--body "%{{ github.repository }}: v%{{ env.VERSION }}" ^
--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 if "%{{ job.status }}" == "cancelled" (
) else if "%JOB_STATUS%" == "cancelled" (
landa-messenger-api chat-send ^
--id "%{{ secrets.CHAT_ID }}" ^
--api_key "%{{ secrets.CHAT_KEY }}" ^
--id "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "🟠 Test - Windows Canceled" ^
--body "%{{ github.repository }}: v%{{ env.VERSION }}" ^
--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 }}" ^
--id "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "🟢 Test - Windows Passed" ^
--body "%{{ github.repository }}: v%{{ env.VERSION }}" ^
--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" ^
Expand All @@ -149,6 +177,14 @@ jobs:
shell: cmd
run: npm install -g @landamessenger/landa-messenger-api

- name: Read version from pubspec.yaml
working-directory: zstandard_platform_interface
id: read_version
shell: cmd
run: |
for /f "tokens=2 delims= " %%a in ('findstr "^version: " pubspec.yaml') do set VERSION=%%a
echo VERSION=%VERSION% >> %GITHUB_ENV%
- name: Get dependencies
working-directory: zstandard_windows
shell: cmd
Expand All @@ -162,33 +198,39 @@ 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" (
if "%JOB_STATUS%" == "failure" (
landa-messenger-api chat-send ^
--id "%{{ secrets.CHAT_ID }}" ^
--api_key "%{{ secrets.CHAT_KEY }}" ^
--id "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "🔴 Dry Run Publish - Windows Failed" ^
--body "%{{ github.repository }}: v%{{ env.VERSION }}" ^
--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 if "%{{ job.status }}" == "cancelled" (
) else if "%JOB_STATUS%" == "cancelled" (
landa-messenger-api chat-send ^
--id "%{{ secrets.CHAT_ID }}" ^
--api_key "%{{ secrets.CHAT_KEY }}" ^
--id "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "🟠 Dry Run Publish - Windows Canceled" ^
--body "%{{ github.repository }}: v%{{ env.VERSION }}" ^
--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 }}" ^
--id "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "🟢 Dry Run Publish - Windows Passed" ^
--body "%{{ github.repository }}: v%{{ env.VERSION }}" ^
--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" ^
Expand Down

0 comments on commit ad613cd

Please sign in to comment.