diff --git a/.github/merge.yml b/.github/merge.yml deleted file mode 100644 index f939b67..0000000 --- a/.github/merge.yml +++ /dev/null @@ -1,109 +0,0 @@ -name: "Merge" - -on: - push: - # pull_request: - # types: [closed] - -jobs: - test: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - name: "Build Changelog" - id: build_changelog - uses: mikepenz/release-changelog-builder-action@{latest-release} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - changes: - runs-on: ubuntu-latest - timeout-minutes: 5 - if: github.event.pull_request.merged - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Get all changed *.dart, files in docs or pubspec.yaml - id: changed-files - uses: tj-actions/changed-files@v37 - with: - base_sha: ${{ github.event.pull_request.base.sha }} - sha: ${{ github.event.pull_request.head.sha }} - files: | - **/*.dart - pubspec.yaml - merge: - runs-on: ubuntu-latest - timeout-minutes: 20 - needs: changes - if: needs.changes.outputs.files == 'true' - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ github.head_ref }} - - name: Setup Dart SDK - uses: dart-lang/setup-dart@v1.5.0 - - name: install cider - run: dart pub global activate cider - - name: Change flutter version tag - run: | - echo "FLUTTER_BUILD_VERSION=$(cider bump patch --bump-build)" >> "$GITHUB_ENV" - - name: Update - id: update - run: | - git config --global user.name "github-actions" - git config --global user.email "github-actions@github.com" - git add -A - git commit --amend --no-edit - git push -f - echo "newSha=$(git rev-parse ${{github.event.pull_request.head.sha}})" >> $GITHUB_ENV - - name: Create tag - uses: actions/github-script@v6 - with: - script: | - github.rest.git.createRef({ - owner: context.repo.owner, - repo: context.repo.repo, - ref: 'refs/tags/${{env.FLUTTER_BUILD_VERSION}}', - sha: "${{env.newSha}}" - }) - - name: release - uses: actions/github-script@v5 - if: ${{ (steps.bump.outputs.release == 'true') && (env.modified == 'true') }} - with: - script: | - github.rest.repos.createRelease({ - draft: false, - generate_release_notes: true, - name: "${{steps.bump.outputs.version}}", - owner: context.repo.owner, - prerelease: false, - repo: context.repo.repo, - tag_name: "${{steps.bump.outputs.version}}", - }); - - name: "Build Changelog" - id: build_changelog - uses: mikepenz/release-changelog-builder-action@{latest-release} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # build_and_deploy: - # if: github.event.pull_request.merged - # runs-on: ubuntu-latest - # needs: merge - # steps: - # - uses: actions/checkout@v3 - # - uses: subosito/flutter-action@v2 - # with: - # flutter-version: "3.13.x" - # channel: "stable" - # - name: Setup flutter - # run: flutter pub get - # - name: build - # run: | - # cd example - # flutter build web -o ../build --no-tree-shake-icons - # - name: Deploy - # uses: JamesIves/github-pages-deploy-action@v4 - # with: - # folder: build diff --git a/.github/pr.yml b/.github/pr.yml deleted file mode 100644 index 4dc4a15..0000000 --- a/.github/pr.yml +++ /dev/null @@ -1,68 +0,0 @@ -name: "PR" - -on: - pull_request: - -jobs: - changes: - runs-on: ubuntu-latest - timeout-minutes: 5 - outputs: - files: ${{steps.changed-files.outputs.any_changed}} - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ github.event.pull_request.head.sha }} - persist-credentials: false - - name: Check branch is up to date - run: | - if git merge-base --is-ancestor ${{ github.event.pull_request.base.sha}} ${{ github.event.pull_request.head.sha}} - then - echo "Your branch is up to date." - exit 0 - else - echo "You need to merge / rebase." - exit 1 - fi - - name: Get all changed *.dart, files in docs or pubspec.yaml - id: changed-files - uses: tj-actions/changed-files@v37 - with: - base_sha: ${{ github.event.pull_request.base.sha }} - sha: ${{ github.event.pull_request.head.sha }} - files: | - **/*.dart - pubspec.yaml - analyze: - runs-on: ubuntu-latest - timeout-minutes: 20 - needs: changes - if: needs.changes.outputs.files == 'true' - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ github.head_ref }} - - uses: subosito/flutter-action@v2 - with: - flutter-version: "3.13.x" - channel: "stable" - - name: Setup flutter - run: flutter pub get - - name: Lint and format - run: | - dart format . -l 120 - dart fix --apply - flutter analyze - - name: Check for modified files - id: git-check - run: echo "modified=$(if [ -n "$(git status --porcelain)" ]; then echo "true"; else echo "false"; fi)" >> $GITHUB_ENV - - name: Update changes in GitHub repository - if: env.modified == 'true' - run: | - git config --global user.name "github-actions" - git config --global user.email "github-actions@github.com" - git add -A - git commit -m '[automated commit] lint format and import sort' - git push diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index f110cb0..f1c2019 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -39,6 +39,14 @@ jobs: - name: Change flutter version tag run: | echo "FLUTTER_BUILD_VERSION=$(cider bump patch --bump-build)" >> "$GITHUB_ENV" + - name: Update CHANGELOG + id: changelog + uses: requarks/changelog-action@v1 + with: + token: ${{ secrets.PAT }} + tag: ${{ steps.read-version.outputs.version-number }} + excludeTypes: "" + includeInvalidCommits: true - name: Update id: update run: | @@ -85,10 +93,9 @@ jobs: - name: Setup flutter run: flutter pub get - name: build - # TODO(thelukewalton): check this works run: | cd example - flutter build web -o ../build --no-tree-shake-icons + flutter build web -o ../build --no-tree-shake-icons --base-href "/zds_flutter/" - name: Deploy uses: JamesIves/github-pages-deploy-action@v4 with: diff --git a/.pubignore b/.pubignore index bfe002f..51ebf46 100644 --- a/.pubignore +++ b/.pubignore @@ -1,3 +1,2 @@ -example/ -assets/ -test/ \ No newline at end of file +test/ +build/ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29..0e08cdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +## [0.2.0] - 2023-09-11 + +### :sparkles: New Features + +- [`885fa19`](https://github.com/zebradevs/zds-flutter/commit/885fa19d4d0ec4426a259b61cb828b6c9fac175e) - init. _(commit by [@thelukewalton](https://github.com/thelukewalton))_ diff --git a/README.md b/README.md index f42c43d..30bf0de 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,10 @@ A library of Flutter components made by Zebra Technologies based on the Zebra Design System, or ZDS. -![GitHub-Mark-Light](assets/zds-light.png#gh-light-mode-only)![GitHub-Mark-Dark](assets/zds-dark.png#gh-dark-mode-only) + + + zds_flutter example + ## Requirements @@ -40,7 +43,7 @@ class DemoApp extends StatelessWidget { ## Viewing the components -To view examples of all the components in the library, you can run the example app in this repo or go to [TODO: INSERT LINK HERE] +To view examples of all the components in the library, you can run the example app in this repo or go to [this link](https://zebradevs.github.io/zds_flutter). ## Theming diff --git a/example/web/index.html b/example/web/index.html index d7baaaf..9299aa2 100644 --- a/example/web/index.html +++ b/example/web/index.html @@ -12,7 +12,7 @@ Fore more details: * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base --> - + diff --git a/pubspec.yaml b/pubspec.yaml index 1c19abe..bdaa699 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: zds_flutter description: Zebra Design System components for Flutter. A selection of UI components from Zebra Technologies. -version: 0.2.0 +version: 0.2.2 homepage: https://github.com/zebradevs/zds_flutter repository: https://github.com/zebradevs/zds_flutter issue_tracker: https://github.com/zebradevs/zds_flutter/issues