Skip to content

Merge pull request #42 from owent/dev #41

Merge pull request #42 from owent/dev

Merge pull request #42 from owent/dev #41

Workflow file for this run

# setup @see https://help.github.com/en/articles/workflow-syntax-for-github-actions
# environment @see https://help.github.com/en/articles/software-in-virtual-environments-for-github-actions
# https://help.github.com/en/articles/virtual-environments-for-github-actions
# example @see https://github.com/actions/toolkit/blob/master/.github/workflows/workflow.yml
name: Release
# This workflow is triggered on pushes to the repository.
on: # @see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events
push:
tags:
- "*"
jobs:
build: # job id, can be any string
# Job name is Build And Publish
name: Build And Publish
# This job runs on Linux
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3 # https://github.com/actions/checkout
with:
lfs: true
submodules: true
- name: Set up JDK 11
uses: actions/setup-java@v3 # https://github.com/actions/setup-java
with:
distribution: temurin
java-version: "11"
java-package: jdk
architecture: x64
- name: Build with Maven
run: |
cd tools
python3 -m pip install --user -r requirements.txt
python3 gen_header_v2.py
python3 gen_header_v3.py
cd ..
mvn package --file pom.xml
if [[ -e "target/protocols.zip" ]]; then rm -f "target/protocols.zip"; fi
if [[ -e "target/tools.zip" ]]; then rm -f "target/tools.zip"; fi
mkdir target/protocols
cp -rf third_party/xresloader-protocol/core/*.proto third_party/xresloader-protocol/core/extensions header/*.pb target/protocols/
echo $(cd target/protocols && zip -r "../protocols.zip" *)
echo $(cd tools && zip -r "../target/tools.zip" requirements.txt extensions.pb *.py)
- uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "target/protocols.zip;target/tools.zip;target/*.jar"
tags: true
draft: true
overwrite: true