Skip to content

Commit

Permalink
feat: add workflows (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanhanks-bestow authored Jan 27, 2024
1 parent 1bb1bdb commit 5615478
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 0 deletions.
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

0 comments on commit 5615478

Please sign in to comment.