Skip to content

Commit

Permalink
Create GitHub Actions workflow to build JioTV Go for JF
Browse files Browse the repository at this point in the history
  • Loading branch information
itsyourap committed Sep 19, 2024
1 parent 0073cec commit eac6d48
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build JF-JioTV for mips32r2

on:
workflow_dispatch:
push:
tags:
- "v*"

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"

- name: Get CA certificates
continue-on-error: true
run: curl -o assets/cacert/cacert.pem https://curl.se/ca/cacert.pem

- name: Download mips32r2 toolchain
run: wget -O toolchain.tar https://github.com/JFC-Group/JF-Buildroot/releases/download/2015.08.1/mipsel-buildroot-linux-uclibc-toolchain-2015.08.1.tar

- name: Extract mips32r2 toolchain
run: tar -xf toolchain.tar

- name: Build
run: LD_LIBRARY_PATH=$(pwd)/mipsel-buildroot-linux-uclibc-toolchain-2015.08.1/usr/lib CC=$(pwd)/mipsel-buildroot-linux-uclibc-toolchain-2015.08.1/usr/bin/mipsel-buildroot-linux-uclibc-gcc GOARCH=mipsle GOOS=linux go build -o jiotv_go-jiofiber-mips32r2 .

- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: jiotv_go-jiofiber-mips32r2
path: jiotv_go-jiofiber-mips32r2

publish:
name: Publish a release
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs: build
steps:
- name: Get all distributables
uses: actions/download-artifact@v4
with:
name: jiotv_go-jiofiber-mips32r2
path: .

- name: Create Release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
make_latest: "true"
files: jiotv_go-jiofiber-mips32r2

0 comments on commit eac6d48

Please sign in to comment.