-
Notifications
You must be signed in to change notification settings - Fork 22
64 lines (56 loc) · 1.99 KB
/
build-packages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Build packages
on: workflow_dispatch
jobs:
build:
name: Build ${{ matrix.arch }}-${{ matrix.sdk }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
arch:
- aarch64_generic
- i386_pentium4
- x86_64
sdk:
- openwrt-22.03
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
- name: Get node-empty
run: |
git clone https://github.com/sbwml/node-empty
- name: Init build dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo swapoff -a
sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc
sudo -E apt-get -qq update
sudo -E apt-get -qq install clang-15 llvm-15
latest_commit="$(curl -s https://api.github.com/repos/daeuniverse/daed/commits/main | jq -r '.sha' | cut -b 1-7)"
timestamp=$(curl -s https://api.github.com/repos/daeuniverse/daed/commits/main | jq -r '.commit.author.date')
formatted_timestamp=$(date --date="$timestamp" "+%Y-%m-%d")
echo "version=$formatted_timestamp-$latest_commit" >> "$GITHUB_ENV"
- name: Building packages
uses: sbwml/openwrt-gh-action-sdk@go1.22
env:
ARCH: ${{ matrix.arch }}-${{ matrix.sdk }}
FEEDNAME: packages_ci
PACKAGES: luci-app-daed
NO_REFRESH_CHECK: true
- name: Upload artifacts
uses: actions/upload-artifact@main
with:
name: ${{ matrix.arch }}
path: bin/packages/${{ matrix.arch }}/packages_ci/*.ipk
- name: Upload packages
uses: ncipollo/release-action@v1
with:
name: daed-${{ env.version }}
allowUpdates: true
tag: daed-${{ env.version }}
commit: master
token: ${{secrets.ACTIONS_DEPLOY_KEY}}
replacesArtifacts: true
artifacts: "bin/packages/${{ matrix.arch }}/packages_ci/*.ipk"