Updated to v0.26. #253
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: Java CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: cmd | |
steps: | |
- name: Clone. | |
uses: actions/checkout@v1 | |
- uses: actions/setup-java@main | |
name: Install Java 17. | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Set up version of Chatty. | |
run: | | |
git checkout master | |
git remote add upstream https://github.com/chatty/chatty | |
git fetch --all | |
git branch master --set-upstream-to upstream/master | |
git status | |
git status > ch.txt | |
python version.py | |
- name: Latest chatty tag. | |
shell: bash | |
run: | | |
curl \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
https://api.github.com/repos/chatty/chatty/releases > latest_chatty.json | |
- name: Parse JSON. | |
shell: python | |
run: | | |
import json | |
import os | |
def writeEnv(key, value): | |
open(os.environ['GITHUB_ENV'], "a").write(key + '=' + value + '\n'); | |
with open('latest_chatty.json') as json_data: | |
data = json.load(json_data)[0]; | |
tag_name = str(data['tag_name']); | |
writeEnv('CHATTY_TAG', tag_name); | |
tag_text = tag_name.replace('-b', ' Beta ').replace('v', ''); | |
writeEnv('CHATTY_TAG_TEXT', tag_text); | |
print(tag_name); | |
print(tag_text); | |
with open('final_version.txt') as ver_data: | |
writeEnv('NEW_TAG_TEXT', str(ver_data.read())); | |
- name: Build with Gradle. | |
run: | | |
gradlew build ^ | |
&& gradlew release ^ | |
&& gradlew ^ | |
releaseWinSetups ^ | |
-PjpackagePath="%java_home%\bin\jpackage.exe" ^ | |
-PinnosetupPath="%programfiles(x86)%\Inno Setup 6\ISCC.exe" ^ | |
-PmtPath="%programfiles(x86)%\Windows Kits\10\bin\10.0.22000.0\x64\mt.exe" | |
- name: Draft release. | |
uses: softprops/[email protected] | |
with: | |
draft: true | |
files: build/releases/* | |
tag_name: v${{ env.NEW_TAG_TEXT }} | |
name: "Chatty Fork ${{ env.NEW_TAG_TEXT }}" | |
body: "- Updated version to official [${{ env.CHATTY_TAG_TEXT }}](https://github.com/chatty/chatty/releases/tag/${{ env.CHATTY_TAG }})." | |
env: | |
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} |