-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (52 loc) · 1.91 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
43
44
45
46
47
48
49
50
51
52
53
name: Release Pillarbox
on:
push:
# Pattern matched against refs/tags
tags:
- '[0-9]+.[0-9].[0-9]'
- '[0-9]+.[0-9].[0-9]-[0-9a-zA-Z]+'
jobs:
build:
runs-on: ubuntu-latest
env:
DEMO_KEY_PASSWORD: ${{ secrets.DEMO_KEY_PASSWORD }}
USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Check if pre release tag
id: check-tag
run: |
if [[ "${GITHUB_REF_NAME}" =~ [0-9]+.[0-9].[0-9]-[0-9a-zA-Z]+ ]]; then
echo "prerelease=true" >> $GITHUB_OUTPUT
fi
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
# the publishing section of your build.gradle
- name: Publish to GitHub Packages
uses: gradle/[email protected]
with:
arguments: publishProdRelease
- name: Build with Gradle
uses: gradle/[email protected]
with:
arguments: assembleProdRelease
- name: upload artifact to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{ secrets.RELEASE_APP_ID }}
serviceCredentialsFileContent: ${{ secrets.FIREBASE_CREDENTIAL_FILE_CONTENT }}
groups: ${{ secrets.RELEASE_GROUPS }}
file: pillarbox-demo/build/outputs/apk/release/pillarbox-demo-prod-release.apk
- uses: ncipollo/release-action@v1
- name: Create Github release
with:
draft: true
prerelease: steps.check-tag.outputs.prerelease == 'true'
skipIfReleaseExists: true
generateReleaseNotes: true