diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 31a459fa5..7c975c513 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -75,14 +75,16 @@ runs: run: melos run fix shell: bash + # Lint - name: analyze - run: melos run analyze + run: melos run --no-select analyze shell: bash - name: Run custom_lint run: melos run custom_lint_analyze shell: bash - + + # Others - name: Verify if mix_lint_test is up to date with mix_lint run: cd scripts && ./compare_files.sh ../packages/mix_lint/lib/src/lints ../packages/mix_lint_test/test/lints shell: bash \ No newline at end of file diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 000000000..a99cbacd6 --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,50 @@ +name: Changelog + +on: + workflow_dispatch: + +jobs: + + version: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install FVM + shell: bash + run: | + curl -fsSL https://fvm.app/install.sh | bash + fvm use stable --force + + - uses: kuhnroyal/flutter-fvm-config-action@v2 + id: fvm-config-action + + - uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }} + channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }} + + - name: Flutter version + shell: bash + run: flutter --version + + - name: Setup Melos + uses: bluefireteam/melos-action@v3 + + - name: Run melos version + run: melos run fix + + - name: Run melos version + run: melos version --yes + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: 'chore: version packages' + title: 'chore: version packages' + body: 'This PR was opened by the changelog GitHub Actions workflow' + branch: 'create-pull-request/package-versions' diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cd4b9ae5b..c1244c0fb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,7 +3,7 @@ name: Publish to pub.dev on: push: tags: - - 'v[0-9]+.[0-9]+.[0-9]+*' + - '*' jobs: test: @@ -24,9 +24,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + + - name: Setup Melos + uses: bluefireteam/melos-action@v3 + - name: 'Publish Package' - uses: k-paxian/dart-package-publisher@master - with: - accessToken: ${{ secrets.OAUTH_ACCESS_TOKEN }} - refreshToken: ${{ secrets.OAUTH_REFRESH_TOKEN }} - relativePath: "packages/mix" + run: melos run publish --no-dry-run \ No newline at end of file diff --git a/melos.yaml b/melos.yaml index af56d18ea..ae81efd48 100644 --- a/melos.yaml +++ b/melos.yaml @@ -10,6 +10,7 @@ categories: - packages/mix - packages/mix_annotations - packages/mix_generator + - packages/mix_lint should_test: - packages/mix - examples/** @@ -19,7 +20,10 @@ command: environment: sdk: ">=3.0.6 <4.0.0" flutter: ">=3.10.6" - + publish: + hooks: + pre: melos run brb + scripts: brb: description: Run build_runner for projects that have it as a dependency @@ -37,15 +41,16 @@ scripts: - melos exec dart fix --apply . - melos exec --depends-on="dart_code_metrics_presets" dcm fix . custom_lint_analyze: - steps: - - dart pub global activate custom_lint - - melos exec --depends-on="mix_lint" custom_lint + run: dart pub global activate custom_lint && melos exec --depends-on="mix_lint" custom_lint analyze: - steps: - - melos exec --category="mix_deps" dart analyze --fatal-infos . - - melos exec --category="mix_deps" --depends-on="dart_code_metrics_presets" dcm analyze --fatal-warnings --fatal-style --fatal-performance . - - melos run custom_lint_analyze + run: | + dcm analyze --fatal-warnings --fatal-style --fatal-performance . + dart analyze --fatal-infos . + exec: + failFast: true + packageFilters: + category: "mix_deps" verify_version_pubspec_changelog: run: ./scripts/verify_changelogs.sh packages