Dependency updates #19
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |