-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (75 loc) · 2.32 KB
/
release.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
90
91
92
93
94
95
name: Release
on:
workflow_dispatch:
permissions:
contents: write
pages: write
jobs:
publish-library:
name: Publish artifacts
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- name: Publish artifacts to maven central
run: ./gradlew publishAllPublicationsToMavenCentralRepository
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_USER }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_PASS }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASS }}
publish-documentation:
name: Publish documentation
needs: [publish-library]
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- name: Run dokka
run: |
./gradlew dokkaHtmlMultiModule
# Move dokka documentation to docs/api directory
mv ./build/dokka/htmlMultiModule ./docs/api
- name: Install python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Configure git credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Build and upload docs
run: |
python3 -m venv venv
source venv/bin/activate
pip3 install -r mkdocs-requirements.txt
mkdocs build
mkdocs gh-deploy --force
publish-release:
name: Create github release
needs: [publish-library, publish-documentation]
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Read version
run: |
version=$(cat trckr.version | tr -d '\n')
echo "version=$version" >> $GITHUB_ENV
- name: Create release
uses: softprops/action-gh-release@v1
with:
body_path: ${{ github.workspace }}/changelog.md
name: v${{ env.version }}
tag_name: v${{ env.version }}
token: ${{ secrets.GITHUB_TOKEN }}