Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add workflows #3

Merged
merged 1 commit into from
Jan 27, 2024
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
14 changes: 14 additions & 0 deletions .github/workflows/analyze.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: analyze
on:
pull_request:
permissions:
pull-requests: read
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- run: echo noop
# - uses: actions/[email protected]
# - uses: dart-lang/setup-dart@v1
# - run: dart pub get
# - run: dart analyze .
14 changes: 14 additions & 0 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: format
on:
pull_request:
permissions:
pull-requests: read
jobs:
format:
runs-on: ubuntu-latest
steps:
- run: echo noop
# - uses: actions/[email protected]
# - uses: dart-lang/setup-dart@v1
# - run: dart pub get
# - run: dart format --set-exit-if-changed .
10 changes: 10 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Publish to pub.dev
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
jobs:
publish:
permissions:
id-token: write
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
26 changes: 26 additions & 0 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: google-github-actions/release-please-action@v4
id: release
with:
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 $
env:
GH_TOKEN: $
20 changes: 20 additions & 0 deletions .github/workflows/semantic-pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Lint PR"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
semantic-pull-request:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: $
22 changes: 22 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: test
on:
pull_request:
permissions:
pull-requests: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: echo noop
# - uses: actions/[email protected]
# - 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