Add releases
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
name: Bug Report
|
||||
about: Create a report to help us fix an issue with a3270
|
||||
title: "[BUG] "
|
||||
labels:
|
||||
- bug
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to report an issue!
|
||||
- type: input
|
||||
id: host_environment
|
||||
attributes:
|
||||
label: Host Environment
|
||||
description: What mainframe / operating system was connected (e.g., z/OS, z/VM, CMS, TSO, MVS 3.8j, Hercules/TK4-)?
|
||||
placeholder: "e.g. z/VM 7.2 CMS, Hercules TK4-"
|
||||
validations:
|
||||
required: false
|
||||
- type: input
|
||||
id: android_device
|
||||
attributes:
|
||||
label: Android Device & OS Version
|
||||
description: What Android device and Android version are you using?
|
||||
placeholder: "e.g. Pixel 8, Android 14 (API 34)"
|
||||
validations:
|
||||
required: false
|
||||
- type: dropdown
|
||||
id: terminal_model
|
||||
attributes:
|
||||
label: Terminal Model
|
||||
description: Terminal model in use
|
||||
options:
|
||||
- 3279-2 (Color 24x80)
|
||||
- 3279-3 (Color 32x80)
|
||||
- 3279-4 (Color 43x80)
|
||||
- 3279-5 (Color 27x132)
|
||||
- 3278 (Monochrome)
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Problem Description
|
||||
description: A clear and concise description of what went wrong.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: steps
|
||||
attributes:
|
||||
label: Steps To Reproduce
|
||||
description: Steps to reproduce the behavior.
|
||||
placeholder: |
|
||||
1. Connect to host '...'
|
||||
2. Open File Transfer dialog
|
||||
3. Start IND$FILE GET ...
|
||||
4. See error ...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Logs / Logcat Output
|
||||
description: Paste any logcat or debug logs here.
|
||||
render: shell
|
||||
@@ -0,0 +1,32 @@
|
||||
name: Feature Request
|
||||
about: Suggest an idea or enhancement for a3270
|
||||
title: "[FEATURE] "
|
||||
labels:
|
||||
- enhancement
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for suggesting a feature or enhancement for a3270!
|
||||
- type: textarea
|
||||
id: problem
|
||||
attributes:
|
||||
label: Is your feature request related to a problem?
|
||||
description: A clear and concise description of what the problem or missing capability is.
|
||||
placeholder: "I'm always frustrated when [...]"
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: solution
|
||||
attributes:
|
||||
label: Describe the solution you'd like
|
||||
description: A clear and concise description of what you want to happen.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: alternatives
|
||||
attributes:
|
||||
label: Describe alternatives you've considered
|
||||
description: Any alternative solutions or features you've considered.
|
||||
validations:
|
||||
required: false
|
||||
@@ -0,0 +1,61 @@
|
||||
name: Build and Test a3270
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main", "master", "develop" ]
|
||||
pull_request:
|
||||
branches: [ "main", "master" ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Android APK
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Configure Dynamic DNS Resolvers
|
||||
run: |
|
||||
printf "nameserver 1.1.1.1\nnameserver 8.8.8.8\n" > /etc/resolv.conf 2>/dev/null || true
|
||||
echo "64.22.43.251 git.hugfreevikings.wtf" | sudo tee -a /etc/hosts || echo "64.22.43.251 git.hugfreevikings.wtf" >> /etc/hosts || true
|
||||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Checkout j3270 (for lib3270j)
|
||||
run: |
|
||||
git clone --depth 1 https://git.hugfreevikings.wtf/rudi/j3270.git j3270
|
||||
|
||||
- name: Set up Java JDK (Temurin 21)
|
||||
uses: actions/setup-java@v3
|
||||
continue-on-error: true
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Set up Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
|
||||
- name: Make scripts executable
|
||||
run: |
|
||||
chmod +x ./gradlew ./build.sh
|
||||
|
||||
- name: Build Android APK
|
||||
run: |
|
||||
./gradlew assembleDebug --no-daemon
|
||||
env:
|
||||
J3270_DIR: ${{ github.workspace }}/j3270
|
||||
|
||||
- name: Upload a3270 APK Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: a3270-debug
|
||||
path: build/outputs/apk/debug/a3270-debug.apk
|
||||
|
||||
- name: Report Build Status
|
||||
if: failure()
|
||||
run: |
|
||||
echo "### ❌ Build Failed" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Please check the runner logs above for details." >> $GITHUB_STEP_SUMMARY
|
||||
@@ -1,51 +0,0 @@
|
||||
name: Build a3270 APK
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Android APK
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Configure DNS and Hosts
|
||||
run: |
|
||||
echo "64.22.43.251 git.hugfreevikings.wtf" | sudo tee -a /etc/hosts || echo "64.22.43.251 git.hugfreevikings.wtf" >> /etc/hosts || true
|
||||
echo "nameserver 1.1.1.1" | sudo tee -a /etc/resolv.conf || echo "nameserver 1.1.1.1" >> /etc/resolv.conf || true
|
||||
echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolv.conf || echo "nameserver 8.8.8.8" >> /etc/resolv.conf || true
|
||||
|
||||
- name: Checkout a3270
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout j3270 (for lib3270j)
|
||||
run: |
|
||||
git clone --depth 1 https://git.hugfreevikings.wtf/rudi/j3270.git j3270
|
||||
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '21'
|
||||
|
||||
- name: Set up Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Build Debug APK
|
||||
run: ./gradlew assembleDebug --no-daemon
|
||||
env:
|
||||
J3270_DIR: ${{ github.workspace }}/j3270
|
||||
|
||||
- name: Upload APK Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: a3270-debug
|
||||
path: build/outputs/apk/debug/a3270-debug.apk
|
||||
if-no-files-found: error
|
||||
@@ -0,0 +1,88 @@
|
||||
name: Release a3270
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Build & Publish Release
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Configure Dynamic DNS Resolvers
|
||||
run: |
|
||||
printf "nameserver 1.1.1.1\nnameserver 8.8.8.8\n" > /etc/resolv.conf 2>/dev/null || true
|
||||
echo "64.22.43.251 git.hugfreevikings.wtf" | sudo tee -a /etc/hosts || echo "64.22.43.251 git.hugfreevikings.wtf" >> /etc/hosts || true
|
||||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Checkout j3270 (for lib3270j)
|
||||
run: |
|
||||
git clone --depth 1 https://git.hugfreevikings.wtf/rudi/j3270.git j3270
|
||||
|
||||
- name: Set up Java JDK (Temurin 21)
|
||||
uses: actions/setup-java@v3
|
||||
continue-on-error: true
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Set up Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
|
||||
- name: Make scripts executable
|
||||
run: |
|
||||
chmod +x ./gradlew ./build.sh
|
||||
|
||||
- name: Build Android APK
|
||||
run: |
|
||||
./gradlew assembleDebug --no-daemon
|
||||
env:
|
||||
J3270_DIR: ${{ github.workspace }}/j3270
|
||||
|
||||
- name: Upload Release Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: a3270-${{ github.ref_name }}
|
||||
path: build/outputs/apk/debug/a3270-debug.apk
|
||||
|
||||
- name: Publish Release to Gitea
|
||||
continue-on-error: true
|
||||
run: |
|
||||
TAG="${{ github.ref_name }}"
|
||||
API_URL="${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases"
|
||||
TOKEN="${{ secrets.GITHUB_TOKEN }}"
|
||||
APK_FILE="build/outputs/apk/debug/a3270-debug.apk"
|
||||
|
||||
IS_PRERELEASE="false"
|
||||
case "$TAG" in
|
||||
*beta*|*alpha*|*rc*|*pre*|*preview*|*dev*)
|
||||
IS_PRERELEASE="true"
|
||||
echo "Tag $TAG detected as pre-release / beta."
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Creating Release for tag $TAG (prerelease=$IS_PRERELEASE)..."
|
||||
RESPONSE=$(curl -s -X POST "$API_URL" \
|
||||
-H "Authorization: token $TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"tag_name\": \"$TAG\", \"name\": \"a3270 $TAG\", \"body\": \"Automated release for **$TAG**.\n\n### Installing a3270\n```bash\nadb install -r a3270.apk\n```\", \"draft\": false, \"prerelease\": $IS_PRERELEASE}")
|
||||
|
||||
RELEASE_ID=$(echo "$RESPONSE" | grep -o '"id":[0-9]*' | head -n 1 | cut -d':' -f2)
|
||||
|
||||
if [ -n "$RELEASE_ID" ] && [ -f "$APK_FILE" ]; then
|
||||
echo "Uploading $APK_FILE to release $RELEASE_ID as a3270.apk..."
|
||||
curl -s -X POST "$API_URL/$RELEASE_ID/assets?name=a3270.apk" \
|
||||
-H "Authorization: token $TOKEN" \
|
||||
-H "Content-Type: application/vnd.android.package-archive" \
|
||||
--data-binary @"$APK_FILE"
|
||||
echo "Release $TAG published with a3270.apk attached successfully!"
|
||||
else
|
||||
echo "Release API response: $RESPONSE"
|
||||
fi
|
||||
Reference in New Issue
Block a user