Skip to content
Open
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
31 changes: 31 additions & 0 deletions .github/workflows/release-prepare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Prepare release
on:
push:
branches: [develop]

jobs:
prepare-release:
name: Prepare release
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'chore(release)')"
steps:
- name: Generate token
id: generate-token
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 #v3.1.1
with:
app-id: ${{ secrets.MELOS_APP_ID }}
private-key: ${{ secrets.MELOS_APP_PRIVATE_KEY }}
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }}
- uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260 # v1.7.2
- uses: bluefireteam/melos-action@705015c3d2bc4ab94201ac24accb2bbe070cf533 # v3.6.0
with:
run-versioning: true
publish-dry-run: true
create-pr: true
token: ${{ steps.generate-token.outputs.token }}
26 changes: 26 additions & 0 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish packages
on:
workflow_dispatch:

jobs:
publish-packages:
name: Publish packages
permissions:
id-token: write # Required for authentication using OIDC
runs-on: [ ubuntu-latest ]
steps:
- name: Generate token
id: generate-token
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 #v3.1.1
with:
app-id: ${{ secrets.MELOS_APP_ID }}
private-key: ${{ secrets.MELOS_APP_PRIVATE_KEY }}
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }}
- uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260 # v1.7.2
- uses: bluefireteam/melos-action@705015c3d2bc4ab94201ac24accb2bbe070cf533 # v3.6.0
with:
publish: true
environment: pub.dev
33 changes: 33 additions & 0 deletions .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Tag and start release
on:
push:
branches: [develop]
workflow_dispatch:

jobs:
publish-packages:
name: Create tags for release
runs-on: [ ubuntu-latest ]
if: contains(github.event.head_commit.message, 'chore(release)')
steps:
- name: Generate token
id: generate-token
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 #v3.1.1
with:
app-id: ${{ secrets.MELOS_APP_ID }}
private-key: ${{ secrets.MELOS_APP_PRIVATE_KEY }}
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }}
- uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260 # v1.7.2
- uses: bluefireteam/melos-action@705015c3d2bc4ab94201ac24accb2bbe070cf533 # v3.6.0
with:
tag: true
token: ${{ steps.generate-token.outputs.token }}
- run: |
melos exec -c 1 --no-published --no-private --order-dependents -- \
gh workflow run release-publish.yml \
--ref \$MELOS_PACKAGE_NAME-v\$MELOS_PACKAGE_VERSION
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ analyzer:
- build/**
- android/**
- ios/**
- web/**
- windows/**
- macos/**
- linux/**
include: package:flutter_lints/flutter.yaml

# Additional information about this file can be found at
Expand Down
4 changes: 4 additions & 0 deletions example/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ analyzer:
- build/**
- android/**
- ios/**
- web/**
- windows/**
- macos/**
- linux/**
include: package:flutter_lints/flutter.yaml

linter:
Expand Down
11 changes: 11 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^5.0.0
melos: ^8.9.0

flutter:
plugin:
Expand All @@ -28,3 +29,13 @@ flutter:
pluginClass: SecurityToolkitPlugin
ios:
pluginClass: SecurityToolkitPlugin

melos:
useRootAsPackage: true
command:
version:
branch: develop
message: |
{new_package_versions}
includeScopes: false
workspaceChangelog: false
Loading