-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (77 loc) · 2.74 KB
/
app-build.yml
File metadata and controls
79 lines (77 loc) · 2.74 KB
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
77
78
79
name: App build 🌶
on:
push:
branches:
- master
- dev
jobs:
build_app:
name: 🪶 Build app and deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '16'
- name: Setup properties SNAPSHOT
if: github.ref == 'refs/heads/dev'
run: |
echo "repoPassword=$SONATYPE_PASSWORD" > deploy.properties
echo "repoUser=$SONATYPE_USER" >> deploy.properties
echo "url=$URL_SONATYPE_SNAPSHOT" >> deploy.properties
env:
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
URL_SONATYPE_SNAPSHOT: ${{ secrets.URL_SONATYPE_SNAPSHOT }}
- name: Setup properties RELEASE
if: github.ref == 'refs/heads/master'
run: |
echo "repoPassword=$SONATYPE_PASSWORD" > deploy.properties
echo "repoUser=$SONATYPE_USER" >> deploy.properties
echo "url=$URL_SONATYPE_RELEASE" >> deploy.properties
env:
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
URL_SONATYPE_RELEASE: ${{ secrets.URL_SONATYPE_RELEASE }}
- name: 🥸 Update version for snapshot
if: github.ref == 'refs/heads/dev'
run: |
version_line=$(cat gradle.properties | grep modulo_version)
sed -i -e "s/$version_line/$version_line-SNAPSHOT/g" gradle.properties
# - name: 🐭 Deploy maven-central
# run: |
# chmod +x gradlew
# ./gradlew clean publish
- name: Setup release title
if: github.ref == 'refs/heads/master'
run: echo "TITLE=$(cat variables.gradle | grep project_version | cut -d '=' -f 2 | sed 's/ //g' | sed s/\'//g)" >> $GITHUB_ENV
- name: Create release
if: github.ref == 'refs/heads/master'
uses: marvinpinto/action-automatic-releases@v1.2.1
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ env.TITLE }}
title: 📦 ${{ env.TITLE }}
prerelease: false
files: |
build/libs/*.jar
deploy_javadoc:
if: github.ref == 'refs/heads/dev'
name: 📄 Deploy javadoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '16'
- name: Build javadoc
run: |
chmod +x gradlew
./gradlew clean javadoc
- name: 🚀 Deploy Javadoc
uses: JamesIves/github-pages-deploy-action@v4.3.3
with:
branch: gh-pages
folder: modulo-api/build/docs/javadoc