forked from leancodepl/patrol
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (44 loc) · 1.35 KB
/
adb-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
name: adb publish
on:
push:
tags: ['adb-v*']
jobs:
main:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/adb
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install Dart
uses: dart-lang/setup-dart@v1
with:
sdk: stable
- name: Download mobile-tools
uses: actions/checkout@v3
with:
repository: leancodepl/mobile-tools
path: mobile-tools
- name: Add mobile-tools to PATH
run: |
echo $GITHUB_WORKSPACE/mobile-tools/bin >> $GITHUB_PATH
- name: Download pub.dev credentials
env:
CREDENTIALS: ${{ secrets.PUB_DEV_CREDENTIALS }}
run: |
mkdir -p ~/.pub-cache
echo $CREDENTIALS > ~/.pub-cache/credentials.json
- name: Set version data
run: |
tag=${{ github.ref_name }}
echo "RELEASE_NOTES=$(link_changelog $tag)" >> $GITHUB_ENV
echo "IS_PRERELEASE=$(is_prerelease $tag)" >> $GITHUB_ENV
- name: Publish to pub.dev
run: dart pub publish --force
- name: Create release
uses: softprops/action-gh-release@v1
with:
name: ${{ github.ref_name }}
body: '[See changelog on pub.dev](${{ env.RELEASE_NOTES }})'
prerelease: ${{ env.IS_PRERELEASE }}