Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/set-up-repo/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runs:
steps:

- name: Set up Dart (${{ inputs.dart-sdk }})
uses: dart-lang/setup-dart@v1
uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260 # v1.7.2
with:
sdk: ${{ inputs.dart-sdk }}

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/multi_version_tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
pull_request:
branches: [ main ]

# Declare default permissions as read only.
permissions:
contents: read

jobs:
analyze:
name: Analyze and Test - Dart ${{ matrix.dart-sdk }}
Expand All @@ -34,6 +38,7 @@ jobs:
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
fetch-depth: 0
persist-credentials: false

- name: Set up environment and tooling
id: setup
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pull_request_label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ on:
types: [opened, synchronize, reopened, closed]

# Declare default permissions as read only.
permissions: read-all
permissions:
contents: read

jobs:
label:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ on:
- main

# Declare default permissions as read only.
permissions: read-all
permissions:
contents: read

jobs:
release:
Expand All @@ -21,6 +22,7 @@ jobs:
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
fetch-depth: 0 # Fetch all history so the tool can get all the tags to determine version.
persist-credentials: false
# Set up the latest stable release of Dart and tooling.
- name: Set up environment and tooling
id: setup
Expand Down Expand Up @@ -53,9 +55,18 @@ jobs:
# verbose:true will produce too many logs that hang github actions web UI.
verbose: false

- name: Configure Git
run: |
gh auth setup-git
git config --global user.name "$USER_NAME"
git config --global user.email "$USER_EMAIL"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USER_NAME: ${{ secrets.USER_NAME }}
USER_EMAIL: ${{ secrets.USER_EMAIL }}
Comment thread
stuartmorgan-g marked this conversation as resolved.
- name: run release
run: |
git config set --global user.name "${{ secrets.USER_NAME }}"
git config set --global user.email "${{ secrets.USER_EMAIL }}"
dart pub global run flutter_plugin_tools publish --all-changed --base-sha=HEAD~ --skip-confirmation --remote=origin
env: {PUB_CREDENTIALS: "${{ secrets.PUB_CREDENTIALS }}"}
env:
PUB_CREDENTIALS: ${{ secrets.PUB_CREDENTIALS }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 10 additions & 2 deletions .github/workflows/validate_repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ on:
pull_request:
branches: [ main ]

# Declare default permissions as read only.
permissions:
contents: read
pull-requests: read

jobs:
analyze:
name: validate
Expand All @@ -25,6 +30,7 @@ jobs:
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
fetch-depth: 0
persist-credentials: false

- name: Set up environment and tooling
id: setup
Expand All @@ -40,13 +46,15 @@ jobs:
- name: Run 'validate' for general repo best practices
if: ${{ !cancelled() && steps.setup.outcome == 'success' }}
run: |
if [ "${{ github.event_name }}" == "push" ]; then
if [ "$EVENT_NAME" = "push" ]; then
dart pub global run flutter_plugin_tools validate --ignore-platform-interface-breaks
else
dart pub global run flutter_plugin_tools validate --check-for-missing-changes --pr-labels="$(gh api --jq '.labels.[].name' /repos/flutter/core-packages/pulls/${{ github.event.number }} | paste -sd ',' -)"
dart pub global run flutter_plugin_tools validate --check-for-missing-changes --pr-labels="$(gh api --jq '.labels.[].name' /repos/flutter/core-packages/pulls/$PR_NUMBER | paste -sd ',' -)"
fi
env:
GH_TOKEN: ${{ github.token }}
EVENT_NAME: ${{ github.event_name }}
PR_NUMBER: ${{ github.event.number }}

- name: Run 'format' to check for formatting violations
if: ${{ !cancelled() && steps.setup.outcome == 'success' }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/windows_unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
pull_request:
branches: [ main ]

# Declare default permissions as read only.
permissions:
contents: read

jobs:
analyze:
name: Windows Test - Dart Stable
Expand All @@ -24,6 +28,7 @@ jobs:
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
fetch-depth: 0
persist-credentials: false

- name: Set up environment and tooling
uses: ./.github/actions/set-up-repo
Expand Down
Loading