-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (46 loc) · 1.3 KB
/
publish-snapshot.yaml
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
name: "Blaze-Expression Publish Snapshot"
on:
push:
branches:
- 'main'
env:
MAVEN_SKIP_RC: true
jobs:
snapshot:
name: Publish Snapshot
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Java 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
- name: Set env
run: echo "JDK8_HOME=$(echo $JAVA_HOME)" >> $GITHUB_ENV
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- name: Get year/month for cache key
id: get-date
run: |
echo "::set-output name=yearmonth::$(/bin/date -u "+%Y-%m")"
shell: bash
- name: Cache Maven local repository
uses: actions/cache@v2
id: cache-maven
with:
path: |
~/.m2/repository
# refresh cache every month to avoid unlimited growth
key: maven-localrepo-${{ steps.get-date.outputs.yearmonth }}
- name: Set up Maven
run: ./mvnw -v
- name: Run build script
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: ./ci/deploy-snapshot.sh
shell: bash