-
-
Notifications
You must be signed in to change notification settings - Fork 164
89 lines (77 loc) · 4 KB
/
publish-snapshot-and-website.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Publish snapshot and website
on:
push:
branches:
- "development"
jobs:
build:
runs-on: ubuntu-latest
steps:
# ================================================================================================================
- name: JDK 11 Setup
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
# ================================================================================================================
- name: Retrieve the sources
uses: actions/checkout@v2
# ================================================================================================================
- name: GPG Setup
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
run: |
echo "$GPG_PRIVATE_KEY" > private.asc
gpg --import --batch private.asc
# ================================================================================================================
# TODO Remove this when my PR will be accepted by XChange team.
- name: Install xchange 5.0.13-SNAPSHOT
run: |
mvn install:install-file -Dfile=util/xchange/xchange-gemini/5.0.13-SNAPSHOT/xchange-gemini-5.0.13-SNAPSHOT.jar
mvn install:install-file -Dfile=util/xchange/xchange-kucoin/5.0.13-SNAPSHOT/xchange-kucoin-5.0.13-SNAPSHOT.jar
# ================================================================================================================
- name: Build, package and deploy to Maven central
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Ossrh credentials.
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
# GPG.
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
mvn deploy -B -DskipTests=true -Dgpg.passphrase=${GPG_PASSPHRASE}
# ================================================================================================================
- name: Retrieve the latest release published on Github
uses: pozetroninc/github-action-get-latest-release@v0.5.0
id: getLatestRelease
with:
repository: ${{ github.repository }}
# ================================================================================================================
- name: Install Go to generate the graphQL documentation with gqldoc
uses: actions/setup-go@v2
with:
go-version: '^1.17.3'
# ================================================================================================================
- name: Add the GraphQL schema and its documentation to the website
run: |
cp spring-boot-starter-api/spring-boot-starter-api-graphql/autoconfigure/src/main/resources/schema/*.graphqls docs/docs/.vuepress/public/api/graphql/definition
go install github.com/Code-Hex/gqldoc/cmd/gqldoc@v0.0.4
gqldoc -s "docs/docs/.vuepress/public/api/graphql/definition/*.graphqls" -o ./docs/docs/learn/graphql-api-documentation
# ================================================================================================================
- name: Install vuepress, set release number, and build the website
run: |
yarn add -D vuepress@next
find . -type f -name "*.md" -exec sed -i 's/CASSANDRE_LATEST_RELEASE/${{ steps.getLatestRelease.outputs.release }}/g' {} \;
yarn --cwd docs install
yarn --cwd docs docs:build docs
# ================================================================================================================
- name: Deploy the website to github pages
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: docs/docs/.vuepress/dist
commit-message: "Website update"
clean: true