-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18c5342
commit 20a969c
Showing
3 changed files
with
48 additions
and
2 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,33 @@ | ||
name: Format and push | ||
|
||
# Github action will require permission to write to repo | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: dart:stable | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: true | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
|
||
- name: Format Dart code | ||
run: dart format . | ||
|
||
- name: git config | ||
run: git config --global --add safe.directory /__w/sdk-for-dart/sdk-for-dart # required to fix dubious ownership | ||
|
||
- name: Add & Commit | ||
uses: EndBug/[email protected] | ||
with: | ||
add: lib | ||
|
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,14 @@ | ||
name: Publish to pub.dev | ||
|
||
on: | ||
push: | ||
tags: | ||
- '[0-9]+\.[0-9]+\.[0-9]+.*' | ||
|
||
jobs: | ||
publish: | ||
permissions: | ||
id-token: write | ||
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 | ||
with: | ||
environment: pub.dev |
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