-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add automatic integration & publish workflows
- Loading branch information
1 parent
d1ce889
commit 1bf8e66
Showing
3 changed files
with
158 additions
and
0 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,37 @@ | ||
name: Integration | ||
|
||
on: | ||
pull_request: | ||
workflow_call: | ||
|
||
env: | ||
FLUTTER_VERSION: '3.13.x' | ||
|
||
jobs: | ||
lint: | ||
name: Check for linting or typing errors | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Install the project | ||
uses: dronetag/gha-shared/.github/actions/flutter-install@master | ||
with: | ||
flutter-version: ${{ env.FLUTTER_VERSION }} | ||
- name: Run code analysis | ||
run: flutter analyze --no-fatal-infos | ||
|
||
# test: | ||
# name: Run unit tests suite | ||
# runs-on: ubuntu-22.04 | ||
# timeout-minutes: 5 | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v3 | ||
# - name: Install the project | ||
# uses: dronetag/gha-shared/.github/actions/flutter-install@master | ||
# with: | ||
# flutter-version: ${{ env.FLUTTER_VERSION }} | ||
# - name: Run test suite | ||
# run: flutter test -r expanded |
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,60 @@ | ||
name: Publish to pub.dev | ||
|
||
# Publish workflow releases a new version, updates changelog | ||
# and publishes the library to pub.dev | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
FLUTTER_VERSION: '3.13.x' | ||
|
||
jobs: | ||
integration: | ||
name: Run integration | ||
uses: ./.github/workflows/integration.yml | ||
|
||
release-version: | ||
name: Release a new version | ||
needs: integration | ||
uses: dronetag/gha-shared/.github/workflows/create-release.yml@master | ||
concurrency: release-version-${{ github.repository }} | ||
with: | ||
install-changelog-plugin: true | ||
must-release: true | ||
secrets: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
bump-pubspec: | ||
name: Bump version in pubspec.yaml | ||
needs: release-version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- uses: dronetag/gha-shared/.github/actions/update-pubspec-version@master | ||
with: | ||
version: ${{ needs.release-version.outputs.version }} | ||
- name: Commit & push | ||
run: | | ||
git commit -a -m "chore: Bump pubspec.yaml version to ${{ needs.release-version.outputs.version }}" | ||
git push | ||
publish: | ||
name: Publish to pub.dev | ||
needs: bump-pubspec | ||
permissions: | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Install the project | ||
uses: dronetag/gha-shared/.github/actions/flutter-install@master | ||
with: | ||
flutter-version: ${{ env.FLUTTER_VERSION }} | ||
- name: Publish to pub.dev | ||
run: flutter pub publish -f |
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,61 @@ | ||
{ | ||
"branches": [ | ||
"master", | ||
{ | ||
"name": "alpha", | ||
"prerelease": true | ||
}, | ||
{ | ||
"name": "beta", | ||
"prerelease": true | ||
} | ||
], | ||
"plugins": [ | ||
[ | ||
"@semantic-release/commit-analyzer", | ||
{ | ||
"releaseRules": [ | ||
{ | ||
"type": "docs", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "refactor", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "style", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "chore", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "perf", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "test", | ||
"release": "patch" | ||
} | ||
] | ||
} | ||
], | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/changelog", | ||
{ | ||
"changelogFile": "CHANGELOG.md" | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"CHANGELOG.md" | ||
] | ||
} | ||
] | ||
] | ||
} |