-
Notifications
You must be signed in to change notification settings - Fork 220
35 lines (33 loc) · 1.07 KB
/
compile_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
name: Compile snapshot with Maven
on:
push:
branches-ignore:
- master
- development
pull_request:
jobs:
build:
runs-on: ubuntu-latest
environment:
name: development
url: https://repo.andrei1058.dev
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '19.0.2+7'
distribution: 'adopt'
- name: Deploy snapshot with Maven
env:
MVN_REPO_USER: ${{ secrets.MVN_REPO_USER }}
MVN_REPO_PASS: ${{ secrets.MVN_REPO_PASS }}
ANDEV_RES_ID: 1
run: |
sudo apt install jq -y
curl -X GET https://api.andrei1058.dev/v1/resources/$ANDEV_RES_ID/versioning/current -H "Accept: application/json" >> version.json
export UPDATE_VERSION=`jq '.version' version.json | tr -d '"'`
mvn versions:set -DnewVersion=$UPDATE_VERSION-SNAPSHOT
mvn versions:update-child-modules
mvn clean install -s ci_settings.xml
echo "UPDATE_VERSION=$UPDATE_VERSION" >> $GITHUB_ENV