Fix text selection handles when scroll mobile (#2176) #220
Workflow file for this run
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: π Publish to pub.dev | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+*' | |
jobs: | |
publish: | |
name: Publish the packages | |
permissions: | |
id-token: write | |
# Give the default GITHUB_TOKEN write permission to commit and push the changed files to the repository. | |
# Also required for uploading files to the Release assets | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: π¦ Checkout repository | |
uses: actions/checkout@v4 | |
# Needed for commit and push changes | |
with: | |
# TODO: Try to not hardcode the branch name | |
ref: master | |
fetch-depth: 0 # To get all tags | |
- name: π Upload LICENSE file to release assets | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: LICENSE | |
- name: π οΈ Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
cache: true | |
- name: π Verify Flutter installation | |
run: flutter --version | |
- name: π₯ Install Flutter dependencies | |
run: flutter pub get | |
- name: π§ Enable local development environment (use the local packages) | |
run: dart ./scripts/enable_local_dev.dart | |
# This is needed in order for the authentication to success | |
# dart pub token add https://pub.dev --env-var PUB_TOKEN | |
# Requests to "https://pub.dev" will now be authenticated using the secret token stored in the environment variable "PUB_TOKEN". | |
- name: ποΈ Set up Dart environment | |
uses: dart-lang/setup-dart@v1 | |
## dart-lang/setup-dart/.github/workflows/publish.yml@v1 | |
# - name: Update the authorization requests to "https://pub.dev" to use the environment variable "PUB_TOKEN". | |
# run: dart pub token add https://pub.dev --env-var PUB_TOKEN | |
# Before publishing the new packages, update the version for all the packages first | |
# Extract version from the tag (handles the 'v' prefix) | |
- name: π·οΈ Extract version from tag as pubspec.yaml version | |
id: extract_version | |
run: | | |
version=$(echo ${GITHUB_REF} | sed 's/^refs\/tags\/v\(.*\)$/\1/') | |
echo "VERSION=${version}" >> $GITHUB_OUTPUT | |
- name: β Validate extracted version format (should be pubspec.yaml valid version) | |
run: | | |
version=${{ steps.extract_version.outputs.VERSION }} | |
if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]]; then | |
echo "β Invalid version format: $version. The version must be a valid pubspec.yaml version" | |
exit 1 | |
fi | |
- name: π·οΈ Extract release tag | |
id: release_tag | |
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
- name: π Fetch release notes from Github API and create a required file by the next step | |
run: dart ./scripts/create_version_content_from_github_release.dart "${{ github.repository }}" "${{ steps.release_tag.outputs.tag }}" | |
- name: π Update version and CHANGELOG for all the packages | |
run: dart ./scripts/update_package_version.dart ${{ steps.extract_version.outputs.VERSION }} | |
- name: πΎ Commit updated version and CHANGELOG | |
id: auto-commit-action | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "chore(version): update to version ${{ steps.extract_version.outputs.VERSION }}" | |
- name: π Verify changes made by the script | |
if: steps.auto-commit-action.outputs.changes_detected == 'true' | |
run: echo "β Changes have been committed." | |
- name: π Check if package is ready for publishing | |
run: flutter pub publish --dry-run | |
- name: π€ Publish flutter_quill | |
run: flutter pub publish --force | |
- name: π€ Publish dart_quill_delta | |
run: flutter pub publish --force | |
working-directory: ./dart_quill_delta/ | |
- name: π€ Publish flutter_quill_extensions | |
run: flutter pub publish --force | |
working-directory: ./flutter_quill_extensions/ | |
- name: π€ Publish flutter_quill_test | |
run: flutter pub publish --force | |
working-directory: ./flutter_quill_test/ |