Skip to content

Commit

Permalink
Create dart.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Awesome-T authored Mar 31, 2024
1 parent b0baadd commit c7ff352
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: CI
run-name: ${{ github.workflow_ref }} test ${{ github.repository }}
permissions:
contents: write
on:
label:
types:
- created
- edited
push:
branches:
- "main"
- "dev"
- "master"
pull_request:
branches:
- "main"
- "dev"
- "master"
issues:
types:
- opened
- labeled
- reopened

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
testing:
runs-on: ubuntu-latest
defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v4

- name: Config Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "$GITHUB_REPOSITORY_OWNER"
- name: Cache Dart dependencies
uses: actions/cache@v2
with:
path: |
~/.pub-cache
key: ${{ runner.os }}-dart-${{ hashFiles('**/pubspec.yaml') }}

- uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}

- name: Exclude example directory
run: |
mv example/ example_temp/
echo "example/" > .gitignore
GIT_INDEX_FILE=.git/index git update-index --assume-unchanged .gitignore
- name: Install dependencies
run: dart pub get

- name: Run tests
run: dart test

- name: Upgrade version and CHANGELOG
run: |
.github/upgrade_version.sh
git add pubspec.yaml
.github/update_changelog.sh
git add CHANGELOG.md
git commit -m "Updete changelog [skin ci]"
git push -f -u origin master

0 comments on commit c7ff352

Please sign in to comment.