forked from FooStudio/tinycolor
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Github Actions for CI/CD (#30)
* Add flutter-action for test * Run flutter-action on every push * Flutter analyze ignore fatal infos * Add format job in flutter-action * Rename flutter-action to ci * Adding caches to ci * Use github.ref + pubspec.yaml hash for cache key * Limit pull_request trigger for ci * Add cd github action * Ignore push with changes on folder starting with `.` and files ending with `.md` * Remove empty lines * Remove empty lines * Remove comments * Update cd.yml * Fix cat -> echo $ENV * Remove all comments * Remove comments * Remove empty line * Use k-paxian/dart-package-publisher action for CD * Add line break at EOF Co-authored-by: Felix <felix.wielander@gmail.com>
- Loading branch information
1 parent
9637a53
commit b605013
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: cd | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
environment: release | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: k-paxian/dart-package-publisher@master | ||
with: | ||
accessToken: ${{ secrets.OAUTH_ACCESS_TOKEN }} | ||
refreshToken: ${{ secrets.OAUTH_REFRESH_TOKEN }} | ||
format: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- '**/*.md' | ||
- '.*/**' | ||
pull_request: | ||
types: | ||
- ready_for_review | ||
- synchronize | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: '12.x' | ||
- uses: actions/cache@v2 | ||
with: | ||
path: /opt/hostedtoolcache/flutter | ||
key: ${{ github.ref }}-${{ hashFiles('pubspec.yaml') }} | ||
- uses: subosito/flutter-action@v1 | ||
- run: flutter doctor -v | ||
- run: flutter pub get | ||
- run: flutter analyze --no-fatal-infos | ||
- run: flutter test | ||
|
||
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: '12.x' | ||
- uses: actions/cache@v2 | ||
with: | ||
path: /opt/hostedtoolcache/flutter | ||
key: ${{ github.ref }}-${{ hashFiles('pubspec.yaml') }} | ||
- uses: subosito/flutter-action@v1 | ||
- run: flutter doctor -v | ||
- run: flutter pub get | ||
- run: flutter format --set-exit-if-changed --dry-run . |