From a8ff7188d7d6b5e194835054d69b1928660a7064 Mon Sep 17 00:00:00 2001 From: ryanhanks-bestow Date: Sat, 27 Jan 2024 04:53:33 -0600 Subject: [PATCH] fix: workflows --- .github/workflows/analyze.yaml | 9 ++++--- .github/workflows/format.yaml | 9 ++++--- .github/workflows/publish.yaml | 2 +- .github/workflows/release-please.yaml | 6 ++--- .github/workflows/semantic-pull-request.yaml | 5 +--- .github/workflows/test.yaml | 25 ++++++++++---------- .gitignore | 1 + 7 files changed, 26 insertions(+), 31 deletions(-) create mode 100644 .gitignore diff --git a/.github/workflows/analyze.yaml b/.github/workflows/analyze.yaml index 23dad32..7390630 100644 --- a/.github/workflows/analyze.yaml +++ b/.github/workflows/analyze.yaml @@ -7,8 +7,7 @@ jobs: analyze: runs-on: ubuntu-latest steps: - - run: echo noop -# - uses: actions/checkout@v4.1.1 -# - uses: dart-lang/setup-dart@v1 -# - run: dart pub get -# - run: dart analyze . + - uses: actions/checkout@v4.1.1 + - uses: dart-lang/setup-dart@v1 + - run: dart pub get + - run: dart analyze . diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml index d9bfdd6..79e328b 100644 --- a/.github/workflows/format.yaml +++ b/.github/workflows/format.yaml @@ -7,8 +7,7 @@ jobs: format: runs-on: ubuntu-latest steps: - - run: echo noop -# - uses: actions/checkout@v4.1.1 -# - uses: dart-lang/setup-dart@v1 -# - run: dart pub get -# - run: dart format --set-exit-if-changed . + - uses: actions/checkout@v4.1.1 + - uses: dart-lang/setup-dart@v1 + - run: dart pub get + - run: dart format --set-exit-if-changed . diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index fa71911..dfcb5cb 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -5,6 +5,6 @@ on: - 'v[0-9]+.[0-9]+.[0-9]+*' jobs: publish: + uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 permissions: id-token: write - uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml index 61247f0..862d7b9 100644 --- a/.github/workflows/release-please.yaml +++ b/.github/workflows/release-please.yaml @@ -17,10 +17,10 @@ jobs: - uses: google-github-actions/release-please-action@v4 id: release with: - token: $ + token: ${{ secrets.release_please_token }} release-type: dart - name: Enable Pull Request Automerge if: steps.release.outputs.prs_created && steps.release.outputs.pr != null - run: gh pr merge --merge --auto $ + run: gh pr merge --merge --auto ${{ fromJson(steps.release.outputs.pr).number }} env: - GH_TOKEN: $ + GH_TOKEN: ${{ secrets.release_please_token }} diff --git a/.github/workflows/semantic-pull-request.yaml b/.github/workflows/semantic-pull-request.yaml index 1a5d8d8..dbf3adf 100644 --- a/.github/workflows/semantic-pull-request.yaml +++ b/.github/workflows/semantic-pull-request.yaml @@ -1,15 +1,12 @@ name: "Lint PR" - on: pull_request_target: types: - opened - edited - synchronize - permissions: pull-requests: read - jobs: semantic-pull-request: name: Validate PR title @@ -17,4 +14,4 @@ jobs: steps: - uses: amannn/action-semantic-pull-request@v5 env: - GITHUB_TOKEN: $ + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 007f609..b72e1af 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -7,16 +7,15 @@ jobs: test: runs-on: ubuntu-latest steps: - - run: echo noop -# - uses: actions/checkout@v4.1.1 -# - uses: dart-lang/setup-dart@v1 -# - run: dart pub get -# - id: check-test-dependency -# run: | -# if grep -q 'test:' pubspec.yaml; then -# echo "test_dependency=true" >> $GITHUB_ENV -# else -# echo "test_dependency=false" >> $GITHUB_ENV -# fi -# - if: env.test_dependency == 'true' -# run: dart test + - uses: actions/checkout@v4.1.1 + - uses: dart-lang/setup-dart@v1 + - run: dart pub get + - id: check-test-dependency + run: | + if grep -q 'test:' pubspec.yaml; then + echo "test_dependency=true" >> $GITHUB_ENV + else + echo "test_dependency=false" >> $GITHUB_ENV + fi + - if: env.test_dependency == 'true' + run: dart test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f46c1ec --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.dart_tool