feature: v1.3.7 #23
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: Tag Version and Publish on Push to Master | |
on: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- master | |
jobs: | |
tag_version: | |
if: github.event.pull_request.merged == true | |
name: Tag and prepare files | |
runs-on: [self-hosted, macOS] | |
steps: | |
- name: Setup local files | |
uses: ../.github/actions/local_files_setup.yml | |
- name: Commit and Push version updates | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: '.' | |
committer_name: GitHub Actions | |
committer_email: [email protected] | |
default_author: user_info | |
message: 'gh-action: Bump dependencies version to ${{ env.VERSION }}' | |
- name: Create tag | |
id: create_tag | |
run: | | |
# Checks if the tag already exists in the remote repository | |
if git rev-parse "v${{ env.VERSION }}" >/dev/null 2>&1; then | |
echo "Error: Tag v${{ env.VERSION }} already exists." | |
exit 1 | |
fi | |
# Check if the version was found | |
if [ -z "${{ env.VERSION }}" ]; then | |
echo "Error: No version found in pubspec.yml" | |
exit 1 | |
fi | |
git tag "v${{ env.VERSION }}" | |
git push origin "v${{ env.VERSION }}" | |
- name: Create release | |
if: ${{ steps.create_tag.outcome == 'success' }} | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: "v${{ env.VERSION }}" | |
name: "${{ github.event.pull_request.title }}" | |
body: "${{ github.event.pull_request.body }}" | |
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 "π΄ Creation Tag Failed" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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 "π Creation Tag Canceled" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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 "π’ Creation Tag Passed" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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: | |
name: Publish Platform Interface dependency | |
runs-on: [self-hosted, macOS] | |
needs: tag_version | |
steps: | |
- name: Setup local files | |
uses: ../.github/actions/local_files_setup.yml | |
- name: Get dependencies | |
working-directory: zstandard_platform_interface | |
run: flutter pub get | |
- name: Analyze check | |
working-directory: zstandard_platform_interface | |
run: flutter analyze | |
- name: Test check | |
working-directory: zstandard_platform_interface | |
run: flutter test | |
- name: Publish Dry Run | |
working-directory: zstandard_platform_interface | |
run: dart pub publish --dry-run | |
- 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/object/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: 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 }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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 }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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 }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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: | |
name: Publish Android dependency | |
runs-on: [self-hosted, macOS] | |
needs: platform_interface | |
steps: | |
- name: Setup local files | |
uses: ../.github/actions/local_files_setup.yml | |
- name: Get dependencies | |
working-directory: zstandard_android | |
run: flutter pub get | |
- name: Analyze check | |
working-directory: zstandard_android | |
run: flutter analyze | |
- name: Test check | |
working-directory: zstandard_android | |
run: flutter test | |
- name: Publish Dry Run | |
working-directory: zstandard_android | |
run: dart pub publish --dry-run | |
- 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 "π΄ Android Failed" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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 "π Android Canceled" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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 "π’ Android Passed" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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: | |
name: Publish iOS dependency | |
runs-on: [self-hosted, macOS] | |
needs: platform_interface | |
steps: | |
- name: Setup local files | |
uses: ../.github/actions/local_files_setup.yml | |
- name: Get dependencies | |
working-directory: zstandard_ios | |
run: flutter pub get | |
- name: Analyze check | |
working-directory: zstandard_ios | |
run: flutter analyze | |
- name: Test check | |
working-directory: zstandard_ios | |
run: flutter test | |
- name: Publish Dry Run | |
working-directory: zstandard_ios | |
run: dart pub publish --dry-run | |
- 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 "π΄ iOS Failed" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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 "π iOS Canceled" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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 "π’ iOS Passed" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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: | |
name: Publish macOS dependency | |
runs-on: [self-hosted, macOS] | |
needs: platform_interface | |
steps: | |
- name: Setup local files | |
uses: ../.github/actions/local_files_setup.yml | |
- name: Get dependencies | |
working-directory: zstandard_macos | |
run: flutter pub get | |
- name: Analyze check | |
working-directory: zstandard_macos | |
run: flutter analyze | |
- name: Test check | |
working-directory: zstandard_macos | |
run: flutter test | |
- name: Publish Dry Run | |
working-directory: zstandard_macos | |
run: dart pub publish --dry-run | |
- 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 "π΄ macOS Failed" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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 "π macOS Canceled" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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 "π’ macOS Passed" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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: | |
name: Publish Windows dependency | |
runs-on: [self-hosted, Windows] | |
needs: platform_interface | |
steps: | |
- name: Setup local files | |
uses: ../.github/actions/local_files_setup.yml | |
- name: Get dependencies | |
working-directory: zstandard_windows | |
run: flutter pub get | |
- name: Analyze check | |
working-directory: zstandard_windows | |
run: flutter analyze | |
- name: Test check | |
working-directory: zstandard_windows | |
run: flutter test | |
- name: Publish Dry Run | |
working-directory: zstandard_windows | |
run: dart pub publish --dry-run | |
- name: Publish | |
working-directory: zstandard_windows | |
run: dart pub publish -f | |
- name: Compress folder | |
run: zip -r zstandard_windows.zip ./zstandard_windows | |
- name: Upload asset to release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: "v${{ env.VERSION }}" | |
files: "./zstandard_windows.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 "π΄ Windows Failed" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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 "π Windows Canceled" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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 "π’ Windows Passed" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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: | |
name: Publish Linux dependency | |
runs-on: [self-hosted, Linux] | |
needs: platform_interface | |
steps: | |
- name: Setup local files | |
uses: ../.github/actions/local_files_setup.yml | |
- name: Get dependencies | |
working-directory: zstandard_linux | |
run: flutter pub get | |
- name: Analyze check | |
working-directory: zstandard_linux | |
run: flutter analyze | |
- name: Test check | |
working-directory: zstandard_linux | |
run: flutter test | |
- name: Publish Dry Run | |
working-directory: zstandard_linux | |
run: dart pub publish --dry-run | |
- 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 "π΄ Linux Failed" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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 "π Linux Canceled" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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 "π’ Linux Passed" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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: | |
name: Publish Web dependency | |
runs-on: [self-hosted, macOS] | |
needs: platform_interface | |
steps: | |
- name: Setup local files | |
uses: ../.github/actions/local_files_setup.yml | |
- name: Get dependencies | |
working-directory: zstandard_web | |
run: flutter pub get | |
- name: Analyze check | |
working-directory: zstandard_web | |
run: flutter analyze | |
- name: Test check | |
working-directory: zstandard_web | |
run: flutter test | |
- name: Publish Dry Run | |
working-directory: zstandard_web | |
run: dart pub publish --dry-run | |
- 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 "π΄ Web Failed" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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 "π Web Canceled" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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 "π’ Web Passed" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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: | |
name: Publish CLI dependency | |
runs-on: [self-hosted, macOS] | |
needs: platform_interface | |
steps: | |
- name: Setup local files | |
uses: ../.github/actions/local_files_setup.yml | |
- name: Get dependencies | |
working-directory: zstandard_cli | |
run: dart pub get | |
- name: Analyze check | |
working-directory: zstandard_cli | |
run: dart analyze | |
- name: Test check | |
working-directory: zstandard_cli | |
run: dart test | |
- name: Publish Dry Run | |
working-directory: zstandard_web | |
run: dart pub publish --dry-run | |
- 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 "π΄ CLI Failed" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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 "π CLI Canceled" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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 "π’ CLI Passed" \ | |
--body "${{ github.repository }}: Tag v${{ env.VERSION }}" \ | |
--url "https://github.com/landamessenger/object/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 | |