-
-
Notifications
You must be signed in to change notification settings - Fork 13
46 lines (36 loc) · 1.19 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
# .github/workflows/publish.yml
name: Publish to pub.dev
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*' # tag-pattern on pub.dev: 'v'
# Publish using the reusable workflow from dart-lang.
jobs:
publish-package:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Flutter
uses: subosito/flutter-action@v2
- name: Get dependencies
run: flutter pub get
- name: Analyze code
run: flutter analyze
- name: Format code
run: dart format --fix .
- name: Check publish warnings
run: dart pub publish --dry-run
- name: Publish package
uses: k-paxian/dart-package-publisher@v1.5.1
with:
credentialJson: ${{ secrets.CREDENTIAL_SECRET }}
flutter: true
skipTests: true
- name: Update nylo.dev
uses: fjogeleit/http-request-action@v1
with:
url: 'https://nylo.dev/api/github/actions/framework/version'
method: 'POST'
customHeaders: '{"Content-Type": "application/json", "X-GH-API-KEY": "${{ secrets.NYLO_API_GH_SECRET }}"}'
data: '{"version": "${{ github.ref_name }}"}'