feature: updated version and workflows #66
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 Linux | |
on: | |
push: | |
branches: | |
- '**' | |
- '!master' | |
#paths: | |
# - "zstandard_linux/**" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
check_linux_analyze: | |
name: Analyze Linux | |
runs-on: [self-hosted, Linux] | |
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 | |
check_linux_test: | |
name: Test Linux | |
runs-on: [self-hosted, Linux] | |
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 | |
check_linux_publish_dry_run: | |
name: Dry Run Publish Linux | |
runs-on: [self-hosted, Linux] | |
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 |