This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 83
107 lines (95 loc) · 4.06 KB
/
action.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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/static/ztool_20240525.zip" -O ztool.zip && unzip ztool.zip && rm ztool.zip
wget -q "https://r2eu.zxwy.link/gh/lx-source/static/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/[email protected]
id: short-sha
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: lx-source-bin_${{ env.SHA }}
path: ./dist
- name: Generate Changelog
run: cd repo && echo PACKAGE_VERSION=`go run release.go` >> $GITHUB_ENV && mv changelog.md ../
- name: Create git tag
uses: pkgdeps/git-tag-action@v3
with:
github_token: ${{ github.token }}
github_repo: ${{ github.repository }}
version: ${{ env.PACKAGE_VERSION }}
git_commit_sha: ${{ github.sha }}
git_tag_prefix: "v"
- name: Release
uses: softprops/action-gh-release@v2
with:
body_path: ./changelog.md
prerelease: false
draft: false
tag_name: v${{ env.PACKAGE_VERSION }}
files: |
./dist/lx-source-android-386.zip
./dist/lx-source-android-amd64.zip
./dist/lx-source-android-arm.zip
./dist/lx-source-android-arm64.zip
./dist/lx-source-darwin-amd64v2-go1.20.14.zip
./dist/lx-source-darwin-amd64v3-go1.20.14.zip
./dist/lx-source-darwin-arm64-go1.20.14.zip
./dist/lx-source-linux-amd64v1.zip
./dist/lx-source-linux-amd64v2.zip
./dist/lx-source-linux-amd64v3.zip
./dist/lx-source-linux-amd64v4.zip
./dist/lx-source-linux-arm5.zip
./dist/lx-source-linux-arm5-go1.20.14.zip
./dist/lx-source-linux-arm6.zip
./dist/lx-source-linux-arm6-go1.20.14.zip
./dist/lx-source-linux-arm64.zip
./dist/lx-source-linux-arm64-go1.20.14.zip
./dist/lx-source-linux-arm7.zip
./dist/lx-source-linux-arm7-go1.20.14.zip
./dist/lx-source-linux-mips64hardfloat-go1.20.14.zip
./dist/lx-source-linux-mips64lehardfloat-go1.20.14.zip
./dist/lx-source-linux-mips64lesoftfloat-go1.20.14.zip
./dist/lx-source-linux-mips64softfloat-go1.20.14.zip
./dist/lx-source-linux-mipshardfloat-go1.20.14.zip
./dist/lx-source-linux-mipslehardfloat-go1.20.14.zip
./dist/lx-source-linux-mipslesoftfloat-go1.20.14.zip
./dist/lx-source-linux-mipssoftfloat-go1.20.14.zip
./dist/lx-source-windows-amd64v1-go1.20.14.zip
./dist/lx-source-windows-amd64v2-go1.20.14.zip
./dist/lx-source-windows-amd64v2.zip
./dist/lx-source-windows-amd64v3-go1.20.14.zip
./dist/lx-source-windows-amd64v3.zip
./dist/lx-source-windows-amd64v4.zip
env:
GITHUB_TOKEN: ${{ github.token }}