-
Notifications
You must be signed in to change notification settings - Fork 7
37 lines (30 loc) · 941 Bytes
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Publish to pub.dev
on:
push:
branches:
- main
tags:
- "v[0-9]+.[0-9]+.[0-9]+*" # tag pattern on pub.dev: 'v'
# Publish using custom workflow
jobs:
dart_pub_publish:
permissions:
id-token: write # This is required for authentication using OIDC
runs-on: ubuntu-latest
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
- name: 📦 Install Dependencies
run: dart pub get
- name: ✨ Check Formatting
run: dart format --line-length 80 --set-exit-if-changed lib test
- name: 🕵️ Analyze
run: flutter analyze lib test
- name: 📢 Publish
run: dart pub publish --force