Skip to content

Publish new version #12

Publish new version

Publish new version #12

Workflow file for this run

name: Publish new version
on:
workflow_run:
workflows: ["Update files"]
types:
- completed
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
platform_interface_analyze:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Analyze Platform Interface
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_platform_interface
run: flutter pub get
- name: Analyze check
working-directory: zstandard_platform_interface
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 - Platform Interface 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 - Platform Interface 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 - Platform Interface 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
platform_interface_test:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Test Platform Interface
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_platform_interface
run: flutter pub get
- name: Test check
working-directory: zstandard_platform_interface
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 - Platform Interface 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 - Platform Interface 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 - Platform Interface 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
platform_interface_publish_dry_run:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Dry Run Publish Platform Interface
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_platform_interface
run: flutter pub get
- name: Publish Dry Run
working-directory: zstandard_platform_interface
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 "πŸ”΄ Platform Interface 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 "🟠 Platform Interface 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 "🟒 Platform Interface 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
platform_interface_publish:
name: Publish Platform Interface
runs-on: [self-hosted, macOS]
needs: [platform_interface_analyze, platform_interface_test, platform_interface_publish_dry_run]
outputs:
version: ${{ steps.read_version.outputs.VERSION }}
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
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
flutter-version: '3.24.3'
- name: Get dependencies
working-directory: zstandard_platform_interface
run: flutter pub get
- name: Publish
working-directory: zstandard_platform_interface
run: dart pub publish -f
- name: Compress folder
run: zip -r zstandard_platform_interface.zip ./zstandard_platform_interface
- name: Upload asset to release
uses: softprops/action-gh-release@v2
with:
tag_name: "v${{ env.VERSION }}"
files: "./zstandard_platform_interface.zip"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Wait for dependency to be available
uses: nick-fields/retry@v3
with:
timeout_minutes: 120
max_attempts: 200
command: cd zstandard_android && flutter pub get
on_retry_command: |
landa-messenger-api chat-send \
--id "${{ secrets.CHAT_ID }}" \
--api_key "${{ secrets.CHAT_KEY }}" \
--title "πŸ”„ Retry getting dependencies" \
--body "Getting dependencies. It could take a while.." \
--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 "#FFFFFFFF" \
--text_color "#DD000000"
- name: Wait a minute
run: sleep 120
- 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 "πŸ”΄ Platform Interface 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 "🟠 Platform Interface 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 "🟒 Platform Interface 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
android_analyze:
name: Analyze Android
runs-on: [self-hosted, macOS]
needs: platform_interface_publish
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_android
run: flutter pub get
- name: Analyze check
working-directory: zstandard_android
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 - Android 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 - Android 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 - Android 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
android_test:
name: Test Android
runs-on: [self-hosted, macOS]
needs: platform_interface_publish
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_android
run: flutter pub get
- name: Test check
working-directory: zstandard_android
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 - Android 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 - Android 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 - Android 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
android_publish_dry_run:
name: Dry Run Publish Android
runs-on: [self-hosted, macOS]
needs: platform_interface_publish
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_android
run: flutter pub get
- name: Publish Dry Run
working-directory: zstandard_android
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 - Android 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 - Android 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 - Android 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
android_publish:
name: Publish Android
runs-on: [self-hosted, macOS]
needs: [platform_interface_publish, android_analyze, android_test, android_publish_dry_run]
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_android
run: flutter pub get
- name: Publish
working-directory: zstandard_android
run: dart pub publish -f
- name: Compress folder
run: zip -r zstandard_android.zip ./zstandard_android
- name: Upload asset to release
uses: softprops/action-gh-release@v2
with:
tag_name: "v${{ env.VERSION }}"
files: "./zstandard_android.zip"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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 "πŸ”΄ Publish - Android 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 "🟠 Publish - Android 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 "🟒 Publish - Android 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
ios_analyze:
name: Analyze iOS
runs-on: [self-hosted, macOS]
needs: platform_interface_publish
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_ios
run: flutter pub get
- name: Analyze check
working-directory: zstandard_ios
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 - iOS 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 - iOS 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 - iOS 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
ios_test:
name: Test iOS
runs-on: [self-hosted, macOS]
needs: platform_interface_publish
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_ios
run: flutter pub get
- name: Test check
working-directory: zstandard_ios
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 - iOS 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 - iOS 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 - iOS 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
ios_publish_dry_run:
name: Dry Run Publish iOS
runs-on: [self-hosted, macOS]
needs: platform_interface_publish
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_ios
run: flutter pub get
- name: Publish Dry Run
working-directory: zstandard_ios
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 - iOS 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 - iOS 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 - iOS 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
ios_publish:
name: Publish iOS
runs-on: [self-hosted, macOS]
needs: [platform_interface_publish, ios_analyze, ios_test, ios_publish_dry_run]
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_ios
run: flutter pub get
- name: Publish
working-directory: zstandard_ios
run: dart pub publish -f
- name: Compress folder
run: zip -r zstandard_ios.zip ./zstandard_ios
- name: Upload asset to release
uses: softprops/action-gh-release@v2
with:
tag_name: "v${{ env.VERSION }}"
files: "./zstandard_ios.zip"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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 "πŸ”΄ Publish - iOS 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 "🟠 Publish - iOS 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 "🟒 Publish - iOS 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
macos_analyze:
name: Analyze macOS
runs-on: [self-hosted, macOS]
needs: platform_interface_publish
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_macos
run: flutter pub get
- name: Analyze check
working-directory: zstandard_macos
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 - macOS 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 - macOS 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 - macOS 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
macos_test:
name: Test macOS
runs-on: [self-hosted, macOS]
needs: platform_interface_publish
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: Test check
working-directory: zstandard_macos
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 - macOS 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 - macOS 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 - macOS 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
macos_publish_dry_run:
name: Dry Run Publish macOS
runs-on: [self-hosted, macOS]
needs: platform_interface_publish
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_macos
run: flutter pub get
- name: Publish Dry Run
working-directory: zstandard_macos
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 - macOS 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 - macOS 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 - macOS 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
macos_publish:
name: Publish macOS
runs-on: [self-hosted, macOS]
needs: [platform_interface_publish, macos_analyze, macos_test, macos_publish_dry_run]
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_macos
run: flutter pub get
- name: Publish
working-directory: zstandard_macos
run: dart pub publish -f
- name: Compress folder
run: zip -r zstandard_macos.zip ./zstandard_macos
- name: Upload asset to release
uses: softprops/action-gh-release@v2
with:
tag_name: "v${{ env.VERSION }}"
files: "./zstandard_macos.zip"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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 "πŸ”΄ Publish - macOS 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 "🟠 Publish - macOS 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 "🟒 Publish - macOS 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
windows_analyze:
name: Analyze Windows
runs-on: [self-hosted, Windows]
needs: platform_interface_publish
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
shell: cmd
run: npm install -g @landamessenger/landa-messenger-api
- name: Get dependencies
working-directory: zstandard_windows
shell: cmd
run: flutter pub get
- name: Analyze check
working-directory: zstandard_windows
shell: cmd
run: flutter analyze
- name: Handle job completion
if: always()
working-directory: zstandard_platform_interface
shell: cmd
env:
CHAT_ID: ${{ secrets.CHAT_ID }}
CHAT_KEY: ${{ secrets.CHAT_KEY }}
REPO: ${{ github.repository }}
JOB_STATUS: ${{ job.status }}
run: |
for /f "tokens=2 delims=: " %%a in ('findstr "^version: " pubspec.yaml') do set VERSION=%%a
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"
) 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 "%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"
)
windows_test:
name: Test Windows
runs-on: [self-hosted, Windows]
needs: platform_interface_publish
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
shell: cmd
run: npm install -g @landamessenger/landa-messenger-api
- name: Get dependencies
working-directory: zstandard_windows
shell: cmd
run: flutter pub get
#- name: Test check
# working-directory: zstandard_windows
# shell: cmd
# run: flutter test
- name: Handle job completion
if: always()
working-directory: zstandard_platform_interface
shell: cmd
env:
CHAT_ID: ${{ secrets.CHAT_ID }}
CHAT_KEY: ${{ secrets.CHAT_KEY }}
REPO: ${{ github.repository }}
JOB_STATUS: ${{ job.status }}
run: |
for /f "tokens=2 delims=: " %%a in ('findstr "^version: " pubspec.yaml') do set VERSION=%%a
echo The VERSION is: %VERSION%
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"
) 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 "%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"
)
windows_publish_dry_run:
name: Dry Run Publish Windows
runs-on: [self-hosted, Windows]
needs: platform_interface_publish
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
shell: cmd
run: npm install -g @landamessenger/landa-messenger-api
- name: Get dependencies
working-directory: zstandard_windows
shell: cmd
run: flutter pub get
- name: Publish Dry Run
working-directory: zstandard_windows
shell: cmd
run: dart pub publish --dry-run
- name: Handle job completion
if: always()
working-directory: zstandard_platform_interface
shell: cmd
env:
CHAT_ID: ${{ secrets.CHAT_ID }}
CHAT_KEY: ${{ secrets.CHAT_KEY }}
REPO: ${{ github.repository }}
JOB_STATUS: ${{ job.status }}
run: |
for /f "tokens=2 delims=: " %%a in ('findstr "^version: " pubspec.yaml') do set VERSION=%%a
echo The VERSION is: %VERSION%
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"
) 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 "%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"
)
windows_publish:
name: Publish Windows
runs-on: [self-hosted, Windows]
needs: [platform_interface_publish, windows_analyze, windows_test, windows_publish_dry_run]
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
shell: cmd
run: npm install -g @landamessenger/landa-messenger-api
- name: Get dependencies
working-directory: zstandard_windows
shell: cmd
run: flutter pub get
- name: Publish
working-directory: zstandard_windows
shell: cmd
run: dart pub publish -f
- name: Compress folder
shell: cmd
run: tar -a -c -f zstandard_windows.zip zstandard_windows
- name: Upload asset to release
uses: softprops/action-gh-release@v2
with:
tag_name: "v${{needs.platform_interface_publish.outputs.version}}"
files: "./zstandard_windows.zip"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Handle job completion
if: always()
working-directory: zstandard_platform_interface
shell: cmd
env:
CHAT_ID: ${{ secrets.CHAT_ID }}
CHAT_KEY: ${{ secrets.CHAT_KEY }}
REPO: ${{ github.repository }}
JOB_STATUS: ${{ job.status }}
run: |
for /f "tokens=2 delims=: " %%a in ('findstr "^version: " pubspec.yaml') do set VERSION=%%a
echo The VERSION is: %VERSION%
if "%JOB_STATUS%" == "failure" (
landa-messenger-api chat-send ^
--id "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "πŸ”΄ 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"
) else if "%JOB_STATUS%" == "cancelled" (
landa-messenger-api chat-send ^
--id "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "🟠 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 "%CHAT_ID%" ^
--api_key "%CHAT_KEY%" ^
--title "🟒 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"
)
linux_analyze:
name: Analyze Linux
runs-on: [self-hosted, Linux]
needs: platform_interface_publish
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_linux
run: flutter pub get
- name: Analyze check
working-directory: zstandard_linux
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 - Linux 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 - Linux 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 - Linux 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
linux_test:
name: Test Linux
runs-on: [self-hosted, Linux]
needs: platform_interface_publish
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_linux
run: flutter pub get
# - name: Test check
# working-directory: zstandard_linux
# 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 - Linux 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 - Linux 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 - Linux 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
linux_publish_dry_run:
name: Dry Run Publish Linux
runs-on: [self-hosted, Linux]
needs: platform_interface_publish
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_linux
run: flutter pub get
- name: Publish Dry Run
working-directory: zstandard_linux
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 - Linux 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 - Linux 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 - Linux 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
linux_publish:
name: Publish Linux
runs-on: [self-hosted, Linux]
needs: [platform_interface_publish, linux_analyze, linux_test, linux_publish_dry_run]
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_linux
run: flutter pub get
- name: Publish
working-directory: zstandard_linux
run: dart pub publish -f
- name: Compress folder
run: zip -r zstandard_linux.zip ./zstandard_linux
- name: Upload asset to release
uses: softprops/action-gh-release@v2
with:
tag_name: "v${{ env.VERSION }}"
files: "./zstandard_linux.zip"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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 "πŸ”΄ Publish - Linux 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 "🟠 Publish - Linux 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 "🟒 Publish - Linux 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
web_analyze:
name: Analyze Web
runs-on: [self-hosted, macOS]
needs: platform_interface_publish
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
web_test:
name: Test Web
runs-on: [self-hosted, macOS]
needs: platform_interface_publish
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
web_publish_dry_run:
name: Dry Run Publish Web
runs-on: [self-hosted, macOS]
needs: platform_interface_publish
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
web_publish:
name: Publish Web
runs-on: [self-hosted, macOS]
needs: [platform_interface_publish, web_analyze, web_test, web_publish_dry_run]
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
working-directory: zstandard_web
run: dart pub publish -f
- name: Compress folder
run: zip -r zstandard_web.zip ./zstandard_web
- name: Upload asset to release
uses: softprops/action-gh-release@v2
with:
tag_name: "v${{ env.VERSION }}"
files: "./zstandard_web.zip"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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 "πŸ”΄ 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 "🟠 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 "🟒 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
cli_analyze:
name: Analyze CLI
runs-on: [self-hosted, macOS]
needs: [android_publish, ios_publish, web_publish, macos_publish, linux_publish, windows_publish]
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_cli
run: dart pub get
- name: Analyze check
working-directory: zstandard_cli
run: dart 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 - CLI 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 - CLI 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 - CLI 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
cli_test:
name: Test CLI
runs-on: [self-hosted, macOS]
needs: [android_publish, ios_publish, web_publish, macos_publish, linux_publish, windows_publish]
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_cli
run: dart pub get
- name: Test check
working-directory: zstandard_cli
run: dart 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 - CLI 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 - CLI 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 - CLI 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
cli_publish_dry_run:
name: Dry Run Publish CLI
runs-on: [self-hosted, macOS]
needs: [android_publish, ios_publish, web_publish, macos_publish, linux_publish, windows_publish]
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_cli
run: dart pub get
- name: Publish Dry Run
working-directory: zstandard_cli
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 - CLI 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 - CLI 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 - CLI 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
cli_publish:
name: Publish CLI
runs-on: [self-hosted, macOS]
needs: [platform_interface_publish, cli_analyze, cli_test, cli_publish_dry_run]
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_cli
run: dart pub get
- name: Publish
working-directory: zstandard_cli
run: dart pub publish -f
- name: Compress folder
run: zip -r zstandard_cli.zip ./zstandard_cli
- name: Upload asset to release
uses: softprops/action-gh-release@v2
with:
tag_name: "v${{ env.VERSION }}"
files: "./zstandard_cli.zip"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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 "πŸ”΄ Publish - CLI 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 "🟠 Publish - CLI 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 "🟒 Publish - CLI 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
zstandard_analyze:
name: Analyze Zstandard
runs-on: [self-hosted, macOS]
needs: [android_publish, ios_publish, web_publish, macos_publish, linux_publish, windows_publish]
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: Wait for dependency to be available
uses: nick-fields/retry@v3
with:
timeout_minutes: 120
max_attempts: 200
command: cd zstandard && flutter pub get
on_retry_command: |
landa-messenger-api chat-send \
--id "${{ secrets.CHAT_ID }}" \
--api_key "${{ secrets.CHAT_KEY }}" \
--title "πŸ”„ Retry getting dependencies" \
--body "Getting dependencies. It could take a while.." \
--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 "#FFFFFFFF" \
--text_color "#DD000000"
- name: Wait a minute
run: sleep 120
- name: Analyze check
working-directory: zstandard
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 - Zstandard 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 - Zstandard 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 - Zstandard 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
zstandard_test:
name: Test Zstandard
runs-on: [self-hosted, macOS]
needs: [android_publish, ios_publish, web_publish, macos_publish, linux_publish, windows_publish]
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: Wait for dependency to be available
uses: nick-fields/retry@v3
with:
timeout_minutes: 120
max_attempts: 200
command: cd zstandard && flutter pub get
on_retry_command: |
landa-messenger-api chat-send \
--id "${{ secrets.CHAT_ID }}" \
--api_key "${{ secrets.CHAT_KEY }}" \
--title "πŸ”„ Retry getting dependencies" \
--body "Getting dependencies. It could take a while.." \
--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 "#FFFFFFFF" \
--text_color "#DD000000"
- name: Wait a minute
run: sleep 120
- name: Test check
working-directory: zstandard
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 - Zstandard 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 - Zstandard 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 - Zstandard 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
zstandard_publish_dry_run:
name: Dry Run Publish Zstandard
runs-on: [self-hosted, macOS]
needs: [android_publish, ios_publish, web_publish, macos_publish, linux_publish, windows_publish]
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: Wait for dependency to be available
uses: nick-fields/retry@v3
with:
timeout_minutes: 120
max_attempts: 200
command: cd zstandard && flutter pub get
on_retry_command: |
landa-messenger-api chat-send \
--id "${{ secrets.CHAT_ID }}" \
--api_key "${{ secrets.CHAT_KEY }}" \
--title "πŸ”„ Retry getting dependencies" \
--body "Getting dependencies. It could take a while.." \
--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 "#FFFFFFFF" \
--text_color "#DD000000"
- name: Wait a minute
run: sleep 120
- name: Publish Dry Run
working-directory: zstandard
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 - Zstandard 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 - Zstandard 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 - Zstandard 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
zstandard_publish:
name: Publish Zstandard
runs-on: [self-hosted, macOS]
needs: [platform_interface_publish, zstandard_analyze, zstandard_test, zstandard_publish_dry_run]
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
run: flutter pub get
- name: Publish
working-directory: zstandard
run: dart pub publish -f
- name: Compress folder
run: zip -r zstandard.zip ./zstandard
- name: Upload asset to release
uses: softprops/action-gh-release@v2
with:
tag_name: "v${{ env.VERSION }}"
files: "./zstandard.zip"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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 "πŸ”΄ Publish - Zstandard 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 "🟠 Publish - Zstandard 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 "🟒 Publish - Zstandard 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