-
Notifications
You must be signed in to change notification settings - Fork 146
76 lines (63 loc) · 2.26 KB
/
patrol-publish.yaml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: patrol publish
on:
push:
tags: ['patrol-v*']
jobs:
publish:
name: Publish on pub.dev
runs-on: ubuntu-latest
outputs:
package_name: ${{ steps.pub_release.outputs.package_name }}
package_version: ${{ steps.pub_release.outputs.package_version }}
changelog_url: ${{ steps.pub_release.outputs.changelog_url }}
prerelease: ${{ steps.pub_release.outputs.prerelease }}
permissions:
id-token: write
contents: write
strategy:
matrix:
flutter-version: ['3.24.x']
flutter-channel: ['stable']
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0
# This step adds the auth token for pub.dev
- name: Set up Dart
uses: dart-lang/setup-dart@v1
with:
sdk: stable
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter-version }}
channel: ${{ matrix.flutter-channel }}
- name: Build DevTools extension
working-directory: packages/patrol_devtools_extension
run: ./publish_to_patrol_extension
- name: Verify that built DevTools extension is in the correct location
working-directory: packages/patrol
run: test ! -z "$(ls -lA extension/devtools/build)"
- name: Publish to pub.dev
id: pub_release
uses: leancodepl/mobile-tools/.github/actions/pub-release@pub-release-v1
with:
path: packages/patrol
notify:
name: Notify on Slack
runs-on: ubuntu-latest
needs: publish
if: needs.publish.outputs.prerelease == 'false'
steps:
- name: Share test results on Slack
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: ${{ vars.SLACK_RELEASES_CHANNEL }}
SLACK_USERNAME: Patrol CI on GitHub Actions
SLACK_ICON: ${{ vars.SLACK_ICON }}
SLACK_TITLE: New ${{ needs.publish.outputs.package_name }} version
SLACK_MESSAGE: |
${{ needs.publish.outputs.package_name }} ${{ needs.publish.outputs.package_version }} has been released 🎉
See release notes <${{ needs.publish.outputs.changelog_url }}|here>