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 iOS | |
on: | |
push: | |
branches: | |
- '**' | |
- '!master' | |
#paths: | |
# - "zstandard_ios/**" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
check_ios_analyze: | |
name: Analyze iOS | |
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_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 | |
check_ios_test: | |
name: Test iOS | |
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_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 | |
check_ios_publish_dry_run: | |
name: Dry Run Publish iOS | |
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_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 |