-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from landamessenger/develop
Bump dependencies
- Loading branch information
Showing
9 changed files
with
354 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Push Analyze Check | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
- '!master' | ||
|
||
jobs: | ||
push_check_analyze: | ||
|
||
runs-on: self-hosted | ||
|
||
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 | ||
|
||
- uses: subosito/flutter-action@v1 | ||
with: | ||
channel: 'stable' | ||
flutter-version: '3.24.3' | ||
|
||
- run: flutter pub get | ||
|
||
- 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 "🔴 Analysis Failed" \ | ||
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \ | ||
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/push_check_analyze.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 "🟠 Analysis Canceled" \ | ||
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \ | ||
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/push_check_analyze.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 "🟢 Analysis Passed" \ | ||
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \ | ||
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/push_check_analyze.yml" \ | ||
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \ | ||
--background_color "#55000000" \ | ||
--text_color "#FFFFFFFF" | ||
fi | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Push Publish Dry Run Check | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
- '!master' | ||
|
||
jobs: | ||
push_check_publish_dry_run: | ||
|
||
runs-on: self-hosted | ||
|
||
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 | ||
|
||
- uses: subosito/flutter-action@v1 | ||
with: | ||
channel: 'stable' | ||
flutter-version: '3.24.3' | ||
|
||
- run: flutter pub get | ||
|
||
- 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 Publish Failed" \ | ||
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \ | ||
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/push_check_publish_dry_run.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 Publish Canceled" \ | ||
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \ | ||
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/push_check_publish_dry_run.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 Publish Passed" \ | ||
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \ | ||
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/push_check_publish_dry_run.yml" \ | ||
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \ | ||
--background_color "#55000000" \ | ||
--text_color "#FFFFFFFF" | ||
fi | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Push Test Check | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
- '!master' | ||
|
||
jobs: | ||
push_check_test: | ||
|
||
runs-on: self-hosted | ||
|
||
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 | ||
|
||
- uses: subosito/flutter-action@v1 | ||
with: | ||
channel: 'stable' | ||
flutter-version: '3.24.3' | ||
|
||
- run: flutter pub get | ||
|
||
- run: flutter test --coverage | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: coverage/lcov.info | ||
|
||
- 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 Failed" \ | ||
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \ | ||
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/push_check_test.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 Canceled" \ | ||
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \ | ||
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/push_check.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 Passed" \ | ||
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \ | ||
--url "https://github.com/landamessenger/firebase_cloud_firestore/actions/workflows/push_check.yml" \ | ||
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \ | ||
--background_color "#55000000" \ | ||
--text_color "#FFFFFFFF" | ||
fi | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
name: Tag Version and Publish on Push to Master | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- master | ||
|
||
jobs: | ||
tag_version_and_publish: | ||
if: github.event.pull_request.merged == true | ||
|
||
runs-on: self-hosted | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Read version from pubspec.yml | ||
id: read_version | ||
run: | | ||
VERSION=$(grep '^version: ' pubspec.yaml | cut -d ' ' -f 2) | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
- name: Create tag | ||
id: create_tag | ||
run: | | ||
# Check if the tag already exists in the remote repository | ||
if git rev-parse "v${{ env.VERSION }}" >/dev/null 2>&1; then | ||
echo "Tag v${{ env.VERSION }} already exists." | ||
else | ||
# Create and push the new tag | ||
git tag "v${{ env.VERSION }}" | ||
git push origin "v${{ env.VERSION }}" | ||
fi | ||
- 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/firebase_cloud_firestore/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/firebase_cloud_firestore/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/firebase_cloud_firestore/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 | ||
- run: flutter pub get | ||
|
||
- run: dart pub publish --dry-run | ||
|
||
- run: dart pub publish -f | ||
|
||
- name: Handle publish 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 "🔴 Pub Publish Failed" \ | ||
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \ | ||
--url "https://github.com/landamessenger/firebase_cloud_firestore/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 "🟠 Pub Publish Canceled" \ | ||
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \ | ||
--url "https://github.com/landamessenger/firebase_cloud_firestore/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 "🟢 Pub Publish Passed" \ | ||
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \ | ||
--url "https://github.com/landamessenger/firebase_cloud_firestore/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 | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
analyzer: | ||
errors: | ||
dangling_library_doc_comments: ignore | ||
include: package:flutter_lints/flutter.yaml | ||
|
||
# Additional information about this file can be found at | ||
# https://dart.dev/guides/language/analysis-options | ||
linter: | ||
rules: | ||
avoid_print: false |
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
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
Oops, something went wrong.