mirror of
https://github.com/ZxwyWebSite/lx-source.git
synced 2025-05-23 21:37:42 +08:00
52 lines
1.6 KiB
YAML
52 lines
1.6 KiB
YAML
name: Action
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout git repo
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: ./repo
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Golang
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.21'
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
go version && go env && export PATH=$PATH:$(go env GOPATH)/bin
|
|
go install golang.org/dl/go1.20.14@latest && go1.20.14 download && go1.20.14 version
|
|
sudo apt-get update
|
|
sudo apt-get -y install gcc-mingw-w64-x86-64
|
|
sudo apt-get -y install gcc-arm-linux-gnueabihf libc6-dev-armhf-cross
|
|
sudo apt-get -y install gcc-aarch64-linux-gnu libc6-dev-arm64-cross
|
|
wget -q https://dl.google.com/android/repository/android-ndk-r26b-linux.zip && unzip -d ~ android-ndk-r26b-linux.zip && rm android-ndk-r26b-linux.zip
|
|
|
|
- name: Fetch Modules
|
|
run: |
|
|
wget -q "https://r2eu.zxwy.link/gh/lx-source/statics/ztool_20240525.zip" -O ztool.zip && unzip ztool.zip && rm ztool.zip
|
|
wget -q "https://r2eu.zxwy.link/gh/lx-source/statics/cr-go-sdk_20240525.zip" -O cr-go-sdk.zip && unzip cr-go-sdk.zip && rm cr-go-sdk.zip
|
|
|
|
- name: Run Action
|
|
run: cd repo && go run action.go && mv dist ../
|
|
|
|
- name: Short SHA
|
|
uses: benjlevesque/short-sha@v3.0
|
|
id: short-sha
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: lx-source-bin_${{ env.SHA }}
|
|
path: ./dist
|