Skip to content

Generate Protocol Specification #170

Generate Protocol Specification

Generate Protocol Specification #170

Workflow file for this run

name: "Generate Protocol Specification"
on:
push:
branches: [ "main" ]
tags-ignore: [ "**" ]
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
generate:
name: "Generate Protocol Specification"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
check-latest: true
cache: 'gradle'
- name: Build Generator
run: ./gradlew clean build shadowJar
- name: Prepare execute directory
run: |
mkdir -p generation/;
mkdir -p generation/result/;
cp -r pages/* generation/result/;
cp build/libs/protocol-generator.jar generation/generator.jar;
- name: Run generator
run: |
cd generation;
java -jar generator.jar --output-file=result/readme.md --version-file=version.txt;
- name: Export processed version to env
run: |
cd generation;
echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV;
- name: Push and Tag generated specification
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: gh-pages
FOLDER: generation/result
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SKIP_EMPTY_COMMITS: true
MESSAGE: Update protocol for ${{ env.VERSION }}
TAG: ${{ env.VERSION }}