forked from dita-ot/dita-ot
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (64 loc) · 2.14 KB
/
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
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
name: Snapshot
on:
push:
branches:
- develop
jobs:
# Build distribution package and upload S3
dist:
if: github.repository == 'dita-ot/dita-ot'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Build distribution package
run: |
./gradlew --no-daemon
./gradlew dist -Pcommit=${GITHUB_SHA} -PskipGenerateDocs=true --no-daemon
- name: Rename distribution file
run: |
rm build/distributions/org.dita.*
mv build/distributions/dita-ot-* build/distributions/dita-ot-develop.zip
- name: Deploy distribution package to S3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'eu-west-1'
SOURCE_DIR: 'build/distributions'
# Publish snapshot to Maven
maven:
if: github.repository == 'dita-ot/dita-ot'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Maven snapshot deployment
run: |
echo "$GPG_ASC" > 24AC15F2.asc
gpg --dearmor 24AC15F2.asc
./gradlew --no-daemon
./gradlew --no-daemon publish \
-PossrhUsername=$OSSRH_USERNAME \
-PossrhPassword=$OSSRH_PASSWORD \
-Psigning.password=$SIGNING_PASSWORD \
-Psigning.keyId=24AC15F2 \
-Psigning.secretKeyRingFile=24AC15F2.asc.gpg
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_PASSWORD: ${{ secrets.GPG_PASSPHRASE }}
GPG_ASC: ${{ secrets.GPG_ASC }}