Skip to content

Commit 6ac16e5

Browse files
committed
Add publish workflow
1 parent 8f50628 commit 6ac16e5

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/publish.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish Package
2+
3+
on:
4+
push:
5+
tags:
6+
# must align with the tag-pattern configured on pub.dev, often just replace
7+
# with [0-9]+.[0-9]+.[0-9]+*
8+
# - 'v[0-9]+.[0-9]+.[0-9]+*' # tag-pattern on pub.dev: 'v'
9+
# If you prefer tags like '1.2.3', without the 'v' prefix, then use:
10+
- '[0-9]+.[0-9]+.[0-9]+*' # tag-pattern on pub.dev: ''
11+
# If you repository contains multiple packages consider a pattern like:
12+
# - 'my_package_name-v[0-9]+.[0-9]+.[0-9]+*'
13+
workflow_dispatch:
14+
15+
jobs:
16+
publish:
17+
permissions:
18+
id-token: write # This is required for authentication using OIDC
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v3
22+
- uses: dart-lang/setup-dart@v1
23+
- name: Install Flutter
24+
uses: subosito/flutter-action@v2
25+
with:
26+
channel: stable
27+
- run: flutter --version
28+
- name: Install Melos
29+
run: flutter pub global activate melos
30+
- name: Bootstrap
31+
run: melos bootstrap
32+
- name: Install dependencies
33+
run: melos deps
34+
- name: Check code formatting
35+
run: melos check-format
36+
- name: Analyze code
37+
run: melos analyze
38+
- name: Publish
39+
run: melos publish --yes --no-dry-run

0 commit comments

Comments
 (0)