diff --git a/.github/workflows/tokens-pr.yml b/.github/workflows/tokens-pr.yml new file mode 100644 index 00000000..3f1168de --- /dev/null +++ b/.github/workflows/tokens-pr.yml @@ -0,0 +1,32 @@ +name: Create Design Tokens PR +on: + push: + branches: + - "design-tokens-**" + +jobs: + pull-request: + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v2 + + - name: Set up Flutter + uses: "./.github/actions/setup" + + - name: Generate tokens files + run: melos gen_theme + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: Automated commit of generated tailor files + file_pattern: "*tailor.dart" + + - name: Create Pull Request + uses: repo-sync/pull-request@v2 + with: + destination_branch: "master" + pr_title: "feat: Design Tokens Update" + pr_body: "Design Tokens were updated! This PR was created to update the code." + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/melos.yaml b/melos.yaml index 783feaa6..f091fe48 100644 --- a/melos.yaml +++ b/melos.yaml @@ -5,7 +5,12 @@ command: workspaceChangelog: false scripts: - gen_icons: melos exec --scope="storybook" -- "dart utils/gen_icons.dart $MELOS_ROOT_PATH/optimus/lib/fonts/config/ lib/stories/icon && dart format lib/stories/icon/icons_list.dart" + gen_icons: + run: melos exec --scope="storybook" -- "dart utils/gen_icons.dart $MELOS_ROOT_PATH/optimus/lib/fonts/config/ lib/stories/icon && dart format lib/stories/icon/icons_list.dart" + description: Generate the list of all icons for the storybook story + gen_theme: + run: melos exec --depends-on=build_runner -- "dart run build_runner build -d" + description: Build all generated files packages: - "**"