-
Notifications
You must be signed in to change notification settings - Fork 43
52 lines (48 loc) · 1.54 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Publish to pub.dev
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
jobs:
publish:
name: Publish to pub.dev
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
# Checkout the repo
- uses: actions/checkout@v3
# Setup Dart SDK
- uses: dart-lang/setup-dart@v1
# Install Flutter
- name: Install and set Flutter version
uses: subosito/flutter-action@v2
with:
flutter-version: '3.16.0'
channel: 'stable'
# Get package dependencies and generate files
- name: Get package dependencies and generate files
run: |
flutter pub get
flutter pub run build_runner build --delete-conflicting-outputs
# Get example app dependencies and generate files
- name: Get example app dependencies and generate files
working-directory: example
run: |
flutter pub get
flutter pub run build_runner build --delete-conflicting-outputs
# Publish
- name: Check Publish Warnings
run: flutter pub publish --dry-run
- name: Publish Package
run: flutter pub publish -f
- name: Notify Channel
uses: slackapi/[email protected]
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: 'INCOMING_WEBHOOK'
with:
payload: |-
{
"text":"Web3Modal Flutter ${{ github.event.release.name }} was just published at https://pub.dev/packages/web3modal_flutter"
}