-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (34 loc) · 1.21 KB
/
release.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: Snapshot Release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+-SNAPSHOT
- v[0-9]+.[0-9]+.[0-9]+-[0-9a-zA-Z]+-SNAPSHOT
- v[0-9]+.[0-9]+.[0-9]+-[0-9a-zA-Z]+-[0-9a-zA-Z]+-SNAPSHOT
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
concurrency:
group: '${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Run Unit Tests
run: ./gradlew test
working-directory: efsity-cli
- name: Generate & upload library snapshot artifact AAR (Android Archive) file
run: ./gradlew clean publishMavenPublicationToSonatypeRepository --stacktrace -PSonatypeUsername=${{ secrets.NEXUS_USERNAME }} -PSonatypePassword=${{ secrets.NEXUS_PASSWORD }}
working-directory: efsity-cli
- name: Github Release
uses: softprops/action-gh-release@v2
with:
prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') }}