-
-
Notifications
You must be signed in to change notification settings - Fork 28
93 lines (90 loc) · 3.22 KB
/
release-upload.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
name: Release Upload
on:
release:
types: [published]
jobs:
shared-outputs:
name: Shared Outputs
runs-on: ubuntu-latest
outputs:
version: ${{ steps.modified_tag.outputs.version }}
steps:
- id: modified_tag
name: Modify Tag
run: |
tag_name="${{ github.event.release.tag_name }}"
version=$(echo "$tag_name" | sed "s/v//")
echo "version=$version" >> $GITHUB_OUTPUT
release:
name: Upload Release Assets
runs-on: ubuntu-latest
needs: shared-outputs
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: (cd web && npm install)
- name: Build with Gradle
run: ./gradlew build client:shadowJar -x test
- name: Upload SolarThing Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./client/build/libs/client-0.0.1-SNAPSHOT-all.jar
asset_name: solarthing-${{ needs.shared-outputs.outputs.version }}.jar
asset_content_type: application/octet-stream
- name: Upload SolarThing GraphQL Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./server/build/libs/server-0.0.1-SNAPSHOT.jar
asset_name: solarthing-graphql-${{ needs.shared-outputs.outputs.version }}.jar
asset_content_type: application/octet-stream
release-docs:
name: Upload Release Documentation
runs-on: ubuntu-latest
needs: shared-outputs
steps:
- uses: actions/checkout@v4
with:
repository: 'wildmountainfarms/solarthing-docs'
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Set-up and generate
run: |
python3 -m venv .venv
source .venv/bin/activate
pip install -r docs/source/requirements.txt
sudo apt-get install python3-sphinx texlive-latex-extra latexmk
(cd docs/ && make latexpdf)
(cd docs/ && make epub)
- name: Upload PDF
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./docs/build/latex/solarthing.pdf
asset_name: solarthing-docs-${{ needs.shared-outputs.outputs.version }}.pdf
asset_content_type: application/octet-stream
- name: Upload Epub
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./docs/build/epub/SolarThing.epub
asset_name: solarthing-docs-${{ needs.shared-outputs.outputs.version }}.epub
asset_content_type: application/octet-stream