Skip to content

Commit

Permalink
Add Android version to build
Browse files Browse the repository at this point in the history
  • Loading branch information
vyPal committed Feb 12, 2024
1 parent 3103760 commit 6a1eb58
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 12 deletions.
40 changes: 29 additions & 11 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,17 @@ jobs:
git push
build:
name: Build
runs-on: ${{ matrix.os }}
needs: [check_changes, create_release, update_version]
if: needs.check_changes.outputs.run_build == 'true'
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go: [1.21.3]
arch: [amd64, arm64]
name: Build
runs-on: ${{ matrix.os }}
needs: [check_changes, create_release, update_version]
if: needs.check_changes.outputs.run_build == 'true'
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go: [1.21.3]
arch: [amd64, arm64]

steps:
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
Expand All @@ -114,7 +114,14 @@ jobs:
env:
GOARCH: ${{ matrix.arch }}
run: go build -v ./src


- name: Build for Android arm64 (Special Case)
if: matrix.os == 'ubuntu-latest' && matrix.arch == 'arm64'
env:
GOOS: android
GOARCH: arm64
run: go build -v -o CaffeineC-Android-arm64 ./src

- name: upload artifact
uses: actions/[email protected]
env:
Expand All @@ -125,6 +132,17 @@ jobs:
asset_name: "CaffeineC-${{ runner.os }}-${{ matrix.arch }}${{ runner.os == 'Windows' && '.exe' || '' }}"
asset_content_type: application/octet-stream

- name: Upload artifact for Android arm64 (Special Case)
if: matrix.os == 'ubuntu-latest' && matrix.arch == 'arm64'
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: CaffeineC-Android-arm64
asset_name: "CaffeineC-Android-arm64"
asset_content_type: application/octet-stream

finalize_release:
name: Finalize Release
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ case $OS in
linux)
DOWNLOAD_URL="https://github.com/vyPal/CaffeineC/releases/latest/download/CaffeineC-Linux"
if [ $(ps -ef|grep -c com.termux ) -gt 1 ]; then
echo "Termux detected."
DOWNLOAD_URL="https://github.com/vyPal/CaffeineC/releases/latest/download/CaffeineC-Android"
PACKAGE_MANAGER="apt"
INSTALL_DIR="/data/data/com.termux/files/usr/bin"
SHARE_DIR="/data/data/com.termux/files/usr/lib"
Expand Down

0 comments on commit 6a1eb58

Please sign in to comment.