67 lines
1.7 KiB
YAML
Raw Normal View History

2025-02-13 19:35:27 +03:00
name: Build and Package OPKG
on:
2025-02-15 00:58:29 +03:00
release:
types: [published]
2025-02-13 19:35:27 +03:00
jobs:
build:
2025-02-14 00:34:41 +03:00
name: Build for ${{ matrix.arch }}
2025-02-13 19:35:27 +03:00
runs-on: ubuntu-latest
strategy:
matrix:
include:
2025-02-14 00:34:41 +03:00
- arch: mipsel-3.4
2025-02-13 19:35:27 +03:00
goos: linux
goarch: mipsle
gomips: softfloat
2025-02-14 00:34:41 +03:00
- arch: mips-3.4
2025-02-13 19:35:27 +03:00
goos: linux
goarch: mips
gomips: softfloat
2025-02-14 00:34:41 +03:00
- arch: aarch64-3.10
2025-02-13 19:35:27 +03:00
goos: linux
goarch: arm64
2025-02-14 00:34:41 +03:00
- arch: armv7-3.2
2025-02-13 19:35:27 +03:00
goos: linux
goarch: arm
goarm: 7
2025-02-14 00:34:41 +03:00
- arch: armv7-2.6
goos: linux
goarch: arm
goarm: 7
- arch: armv5-3.2
2025-02-13 19:35:27 +03:00
goos: linux
goarch: arm
goarm: 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
2025-02-14 00:51:31 +03:00
with:
fetch-depth: 0
fetch-tags: true
2025-02-13 19:35:27 +03:00
- name: Set up Go
2025-02-15 00:47:22 +03:00
uses: actions/setup-go@v3
2025-02-13 19:35:27 +03:00
with:
go-version: '1.21'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y fakeroot
2025-02-13 21:08:11 +03:00
- name: Build and Package
2025-02-13 19:35:27 +03:00
run: |
2025-02-13 21:08:11 +03:00
ARCH=${{ matrix.arch }} GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} GOMIPS=${{ matrix.gomips }} GOARM=${{ matrix.goarm }} make
2025-02-13 19:35:27 +03:00
2025-02-15 00:58:29 +03:00
- name: Upload asset to release
if: ${{ github.event_name == 'release' }}
uses: https://gitea.com/actions/release-action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |-
2025-02-15 01:10:28 +03:00
.build/magitrickle_*_${{ matrix.arch }}.ipk
2025-02-15 00:58:29 +03:00
api_key: '${{secrets.RELEASE_TOKEN}}'