-
Notifications
You must be signed in to change notification settings - Fork 18
66 lines (63 loc) · 1.95 KB
/
release_snapshot.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Release SNAPSHOT
on:
# update SNAPSHOT build whenever a push or merge occurs on master
push:
branches:
- master
env:
SIGNING_KEY_FILE: /home/runner/secretKey.gpg
jobs:
build_aar:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Java
uses: ./.github/actions/setup_java
- name: Decode Signing Key
run: ./ci decode_signing_key
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
- name: Assemble
run: ./ci build
env:
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
# Run unit tests after a successful build
unit_test_browser_switch:
name: Unit Test Browser Switch
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Java
uses: ./.github/actions/setup_java
- name: Run Unit Tests
run: ./ci unit_tests
publish_browser_switch_snapshot:
needs: [ build_aar, unit_test_browser_switch ]
name: Publish SNAPSHOT
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Java
uses: ./.github/actions/setup_java
- name: Decode Signing Key
run: ./ci decode_signing_key
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
- name: Publish SNAPSHOT to Sonatype
run: ./ci publish snapshot
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
release_finished:
needs: [ publish_browser_switch_snapshot ]
name: Release Finished
runs-on: ubuntu-latest
steps:
- run: echo "Release finished"