feature: updated version and workflows #64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push Checks Web | |
on: | |
push: | |
branches: | |
- '**' | |
- '!master' | |
#paths: | |
# - "zstandard_web/**" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
check_web_analyze: | |
name: Analyze Web | |
runs-on: [self-hosted, macOS] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js 18 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18.x' | |
- name: Install Landa Messenger CLI | |
run: npm install @landamessenger/landa-messenger-api -g | |
- name: Read version from pubspec.yml | |
working-directory: zstandard_platform_interface | |
id: read_version | |
run: | | |
VERSION=$(grep '^version: ' pubspec.yaml | cut -d ' ' -f 2) | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- uses: subosito/flutter-action@v1 | |
with: | |
channel: 'stable' | |
flutter-version: '3.24.3' | |
- name: Get dependencies | |
working-directory: zstandard_web | |
run: flutter pub get | |
- name: Analyze check | |
working-directory: zstandard_web | |
run: flutter analyze | |
- name: Handle job completion | |
if: always() | |
run: | | |
if [ "${{ job.status }}" == "failure" ]; then | |
landa-messenger-api chat-send \ | |
--id "${{ secrets.CHAT_ID }}" \ | |
--api_key "${{ secrets.CHAT_KEY }}" \ | |
--title "π΄ Analyze - Web 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" \ | |
--text_color "#FFFFFFFF" | |
elif [ "${{ job.status }}" == "cancelled" ]; then | |
landa-messenger-api chat-send \ | |
--id "${{ secrets.CHAT_ID }}" \ | |
--api_key "${{ secrets.CHAT_KEY }}" \ | |
--title "π Analyze - Web 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" \ | |
--text_color "#FFFFFFFF" | |
else | |
landa-messenger-api chat-send \ | |
--id "${{ secrets.CHAT_ID }}" \ | |
--api_key "${{ secrets.CHAT_KEY }}" \ | |
--title "π’ Analyze - Web 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" \ | |
--text_color "#FFFFFFFF" | |
fi | |
check_web_test: | |
name: Test Web | |
runs-on: [self-hosted, macOS] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js 18 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18.x' | |
- name: Install Landa Messenger CLI | |
run: npm install @landamessenger/landa-messenger-api -g | |
- name: Read version from pubspec.yml | |
working-directory: zstandard_platform_interface | |
id: read_version | |
run: | | |
VERSION=$(grep '^version: ' pubspec.yaml | cut -d ' ' -f 2) | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- uses: subosito/flutter-action@v1 | |
with: | |
channel: 'stable' | |
flutter-version: '3.24.3' | |
- name: Get dependencies | |
working-directory: zstandard_web | |
run: flutter pub get | |
- name: Test check | |
working-directory: zstandard_web | |
run: flutter test | |
- name: Handle job completion | |
if: always() | |
run: | | |
if [ "${{ job.status }}" == "failure" ]; then | |
landa-messenger-api chat-send \ | |
--id "${{ secrets.CHAT_ID }}" \ | |
--api_key "${{ secrets.CHAT_KEY }}" \ | |
--title "π΄ Test - Web 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" \ | |
--text_color "#FFFFFFFF" | |
elif [ "${{ job.status }}" == "cancelled" ]; then | |
landa-messenger-api chat-send \ | |
--id "${{ secrets.CHAT_ID }}" \ | |
--api_key "${{ secrets.CHAT_KEY }}" \ | |
--title "π Test - Web 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" \ | |
--text_color "#FFFFFFFF" | |
else | |
landa-messenger-api chat-send \ | |
--id "${{ secrets.CHAT_ID }}" \ | |
--api_key "${{ secrets.CHAT_KEY }}" \ | |
--title "π’ Test - Web 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" \ | |
--text_color "#FFFFFFFF" | |
fi | |
check_web_publish_dry_run: | |
name: Dry Run Publish Web | |
runs-on: [self-hosted, macOS] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js 18 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18.x' | |
- name: Install Landa Messenger CLI | |
run: npm install @landamessenger/landa-messenger-api -g | |
- name: Read version from pubspec.yml | |
working-directory: zstandard_platform_interface | |
id: read_version | |
run: | | |
VERSION=$(grep '^version: ' pubspec.yaml | cut -d ' ' -f 2) | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- uses: subosito/flutter-action@v1 | |
with: | |
channel: 'stable' | |
flutter-version: '3.24.3' | |
- name: Get dependencies | |
working-directory: zstandard_web | |
run: flutter pub get | |
- name: Publish Dry Run | |
working-directory: zstandard_web | |
run: dart pub publish --dry-run | |
- name: Handle job completion | |
if: always() | |
run: | | |
if [ "${{ job.status }}" == "failure" ]; then | |
landa-messenger-api chat-send \ | |
--id "${{ secrets.CHAT_ID }}" \ | |
--api_key "${{ secrets.CHAT_KEY }}" \ | |
--title "π΄ Dry Run Publish - Web 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" \ | |
--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 - Web 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" \ | |
--text_color "#FFFFFFFF" | |
else | |
landa-messenger-api chat-send \ | |
--id "${{ secrets.CHAT_ID }}" \ | |
--api_key "${{ secrets.CHAT_KEY }}" \ | |
--title "π’ Dry Run Publish - Web 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" \ | |
--text_color "#FFFFFFFF" | |
fi |