mirror of
https://github.com/bolucat/Archive.git
synced 2026-04-23 00:17:16 +08:00
Update On Tue Dec 31 19:31:58 CET 2024
This commit is contained in:
+37
-13
@@ -35,8 +35,8 @@ jobs:
|
||||
- name: Current Version
|
||||
id: current_version
|
||||
run: |
|
||||
echo "version=$(sed -n 1p ./${{ github.ref_name }}/version |awk -F '-' '{print $1}' |awk -F 'v' '{print $2}')" >> $GITHUB_OUTPUT
|
||||
echo "Current Version: $(sed -n 1p ./${{ github.ref_name }}/version |awk -F '-' '{print $1}' |awk -F 'v' '{print $2}')"
|
||||
echo "version=$(sed -n 1p ./${{ github.ref_name }}/version |awk -F 'v' '{print $2}')" >> $GITHUB_OUTPUT
|
||||
echo "Current Version: $(sed -n 1p ./${{ github.ref_name }}/version |awk -F 'v' '{print $2}')"
|
||||
|
||||
Compile:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -53,7 +53,7 @@ jobs:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install curl git tar
|
||||
sudo apt-get -y install curl git tar zstd
|
||||
|
||||
- name: Install OpenWrt SDK
|
||||
run: |
|
||||
@@ -63,12 +63,23 @@ jobs:
|
||||
cd \tmp
|
||||
tar xjf SDK.tar.bz2
|
||||
mv "OpenWrt-SDK-15.05.1-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64" "SDK"
|
||||
|
||||
- name: Install OpenWrt SNAPSHPT SDK
|
||||
run: |
|
||||
cd ..
|
||||
curl -SLk --connect-timeout 30 --retry 2 "https://downloads.openwrt.org/snapshots/targets/x86/64/openwrt-sdk-x86-64_gcc-13.3.0_musl.Linux-x86_64.tar.zst" -o "./tmp/SNAPSDK.tar.zst"
|
||||
cd \tmp
|
||||
zstd -d SNAPSDK.tar.zst
|
||||
tar xf SNAPSDK.tar
|
||||
mv "openwrt-sdk-x86-64_gcc-13.3.0_musl.Linux-x86_64" "SNAPSDK"
|
||||
|
||||
- name: Copy OpenClash Source Codes
|
||||
run: |
|
||||
cd ..
|
||||
mkdir tmp/SDK/package/luci-app-openclash
|
||||
mkdir -p tmp/SDK/package/luci-app-openclash
|
||||
mkdir -p tmp/SNAPSDK/package/luci-app-openclash
|
||||
cp -rf "./OpenClash/luci-app-openclash/." "./tmp/SDK/package/luci-app-openclash/"
|
||||
cp -rf "./OpenClash/luci-app-openclash/." "./tmp/SNAPSDK/package/luci-app-openclash/"
|
||||
|
||||
- name: Compile po2lmo
|
||||
run: |
|
||||
@@ -77,12 +88,24 @@ jobs:
|
||||
pushd luci-app-openclash/tools/po2lmo
|
||||
make && sudo make install
|
||||
popd
|
||||
cd ../../..
|
||||
cd tmp/SNAPSDK/package/
|
||||
pushd luci-app-openclash/tools/po2lmo
|
||||
make && sudo make install
|
||||
popd
|
||||
|
||||
- name: Compile OpenClash IPK
|
||||
run: |
|
||||
cd ..
|
||||
cd tmp/SDK
|
||||
make package/luci-app-openclash/compile V=99
|
||||
|
||||
- name: Compile OpenClash APK
|
||||
run: |
|
||||
cd ..
|
||||
cd tmp/SNAPSDK
|
||||
make defconfig
|
||||
make package/luci-app-openclash/compile V=99
|
||||
|
||||
- name: Switch OpenClash Repository to Package
|
||||
uses: actions/checkout@v4
|
||||
@@ -91,18 +114,19 @@ jobs:
|
||||
|
||||
- name: Commit and Push New Version
|
||||
run: |
|
||||
rm -rf ./${{ github.ref_name }}/luci-app-openclash_*
|
||||
echo "v${{ needs.Get-Version.outputs.version }}-beta" > ./${{ github.ref_name }}/version
|
||||
echo "https://img.shields.io/badge/New Release-v${{ needs.Get-Version.outputs.version }}--beta-orange.svg" >> ./${{ github.ref_name }}/version
|
||||
rm -rf ./${{ github.ref_name }}/luci-app-openclash*
|
||||
echo "v${{ needs.Get-Version.outputs.version }}" > ./${{ github.ref_name }}/version
|
||||
echo "https://img.shields.io/badge/New Release-v${{ needs.Get-Version.outputs.version }}-orange.svg" >> ./${{ github.ref_name }}/version
|
||||
cd ..
|
||||
cp "./tmp/SDK/bin/ar71xx/packages/base/luci-app-openclash_${{ needs.Get-Version.outputs.version }}-beta_all.ipk" "./OpenClash/${{ github.ref_name }}/luci-app-openclash_${{ needs.Get-Version.outputs.version }}-beta_all.ipk"
|
||||
sed -i -E "s/OpenClash\/tree\/v(.*)-beta/OpenClash\/tree\/v${{ needs.Get-Version.outputs.version }}-beta/g" ./OpenClash/${{ github.ref_name }}/README.md
|
||||
sed -i -E "s/OpenClash\/releases\/tag\/v(.*)-beta/OpenClash\/releases\/tag\/v${{ needs.Get-Version.outputs.version }}-beta/g" ./OpenClash/${{ github.ref_name }}/README.md
|
||||
sed -i -E "s/source code-v(.*)--beta-green/source code-v${{ needs.Get-Version.outputs.version }}--beta-green/g" ./OpenClash/${{ github.ref_name }}/README.md
|
||||
sed -i -E "s/New Release-v(.*)--beta-orange/New Release-v${{ needs.Get-Version.outputs.version }}--beta-orange/g" ./OpenClash/${{ github.ref_name }}/README.md
|
||||
cp "./tmp/SDK/bin/ar71xx/packages/base/luci-app-openclash_${{ needs.Get-Version.outputs.version }}_all.ipk" "./OpenClash/${{ github.ref_name }}/luci-app-openclash_${{ needs.Get-Version.outputs.version }}_all.ipk"
|
||||
cp "./tmp/SNAPSDK/bin/packages/x86_64/base/luci-app-openclash-${{ needs.Get-Version.outputs.version }}.apk" "./OpenClash/${{ github.ref_name }}/luci-app-openclash-${{ needs.Get-Version.outputs.version }}.apk"
|
||||
sed -i -E "s/OpenClash\/tree\/v(.*)/OpenClash\/tree\/v${{ needs.Get-Version.outputs.version }}/g" ./OpenClash/${{ github.ref_name }}/README.md
|
||||
sed -i -E "s/OpenClash\/releases\/tag\/v(.*)/OpenClash\/releases\/tag\/v${{ needs.Get-Version.outputs.version }}/g" ./OpenClash/${{ github.ref_name }}/README.md
|
||||
sed -i -E "s/source code-v(.*)-green/source code-v${{ needs.Get-Version.outputs.version }}-green/g" ./OpenClash/${{ github.ref_name }}/README.md
|
||||
sed -i -E "s/New Release-v(.*)-orange/New Release-v${{ needs.Get-Version.outputs.version }}-orange/g" ./OpenClash/${{ github.ref_name }}/README.md
|
||||
cd \OpenClash
|
||||
git config user.name 'github-actions[bot]'
|
||||
git config user.email 'github-actions[bot]@users.noreply.github.com'
|
||||
git add .
|
||||
git commit -m "Auto Release: v${{ needs.Get-Version.outputs.version }}-beta"
|
||||
git commit -m "Auto Release: v${{ needs.Get-Version.outputs.version }}"
|
||||
git push
|
||||
|
||||
Reference in New Issue
Block a user