Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Feed SDK test on every PR

on:
pull_request:
branches-ignore:
- master

jobs:
run-flutter-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- run: flutter pub get

- name: Lint
run: flutter analyze > lint-results.txt

- name: Upload the lint results as an artifact
if: always()
uses: actions/upload-artifact@v2
with:
name: lint-results
path: lint-results.txt
67 changes: 67 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Create Tag and Release on Version Change

on:
push:
branches:
- master

permissions: write-all

jobs:
create_tag:
name: Create Git Tag
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Check for version changes
run: |
# Fetch all tags from the remote repository
git fetch --tags

# Get the previous version from the last release tag
export previous_version=$(git describe --tags --abbrev=0)

# Get the current version from pubspec.yaml
export current_version=$(cat pubspec.yaml | grep 'version:' | awk '{print $2}')

if [[ "$previous_version" != "v$current_version" ]]; then
echo "Version has changed from $previous_version to v$current_version."
else
echo "Version has not changed."
exit 1
fi

- name: Push Git Tag
run: |
# Git login
git config --global user.name "$(git log -n 1 --pretty=format:%an)"
git config --global user.email "$(git log -n 1 --pretty=format:%ae)"

# Push a Git tag with the new version
export current_version=$(cat pubspec.yaml | grep 'version:' | awk '{print $2}')
git tag -a "v$current_version" -m "Version $current_version"
git push origin "v$current_version"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

create-github-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: create_tag
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Create Release
run: gh release create "$(git describe --tags --abbrev=0)" --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27 changes: 27 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,30 @@ include: package:flutter_lints/flutter.yaml

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# Style rules
- camel_case_types
- library_names
- avoid_catches_without_on_clauses
- avoid_catching_errors
- avoid_empty_else
- unnecessary_brace_in_string_interps
- avoid_redundant_argument_values
- leading_newlines_in_multiline_strings
# formatting
- lines_longer_than_80_chars
- curly_braces_in_flow_control_structures
# doc comments
- slash_for_doc_comments
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.3.5
version: 1.3.6

environment:
sdk: '>=3.0.0 <4.0.0'
Expand Down
1 change: 0 additions & 1 deletion lib/src/widgets/media/carousel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ class _LMCarouselState extends State<LMCarousel> {
@override
Widget build(BuildContext context) {
mapAttachmentsToWidget();
final size = MediaQuery.of(context).size.width;
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(widget.borderRadius ?? 0),
Expand Down
Loading