-
Notifications
You must be signed in to change notification settings - Fork 105
42 lines (39 loc) · 1.11 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
name: Publish to pub.dev
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+[0-9]'
jobs:
publish:
permissions:
id-token: write
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Flutter
uses: subosito/flutter-action@v1
with:
flutter-version: "3.10.1"
- name: Set up Dart
uses: dart-lang/setup-dart@v1
- name: Get dependencies
run: flutter pub get
- name: Publish to pub.dev dry run
run: dart pub publish --dry-run
- name: Publish to pub.dev
run: dart pub publish -f
- name: Extract release notes
id: extract-release-notes
uses: ffurrer2/extract-release-notes@v1
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: ${{ github.ref_name }}
body: ${{ steps.extract-release-notes.outputs.release_notes }}
draft: false
prerelease: false