-
Notifications
You must be signed in to change notification settings - Fork 2
65 lines (65 loc) · 2.27 KB
/
artifacts-release-nightly.yaml
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
name: Artifacts Release Nightly
on:
push:
schedule:
- cron: '1 0 * * *' # Nightly build.
jobs:
build-artifacts:
name: build-openwrt-and-config
if: ${{ !contains(github.event.head_commit.message, '[no release]') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup-dependencies
run: |
pip3 install --user --upgrade cryptography emoji pycountry pytz pyyaml requests
- name: generate-clash-conf
env:
PASSWORD: ${{ secrets.MASTER_PASSWORD }}
run: |
conf-gen/generate.py -s conf-gen/source.yaml -o artifacts-conf/
for f in $( ls artifacts-conf/* ); do
gpg -c --batch --yes --passphrase=${PASSWORD} $f
rm $f
done
- name: build-openwrt-stable
env:
PASSWORD: ${{ secrets.MASTER_PASSWORD }}
TARGET: x86/64
VERSION: '22.03.4'
REPOSITORY: https://downloads.openwrt.org
GCC_VERSION: 11.2.0_musl
run: |
bash openwrt-builder/build.sh
cp -r /tmp/openwrt/openwrt-imagebuilder-$VERSION-${TARGET/\//-}.Linux-${TARGET/\//_}/bin/targets/$TARGET artifacts-$VERSION
for f in $(find artifacts-$VERSION -iname '*.gz'); do
gpg -c --batch --yes --passphrase=${PASSWORD} $f
rm $f
done
- name: build-openwrt-snapshots
env:
PASSWORD: ${{ secrets.MASTER_PASSWORD }}
TARGET: x86/64
VERSION: 'snapshots'
REPOSITORY: https://downloads.openwrt.org
GCC_VERSION: 12.3.0_musl
run: |
bash openwrt-builder/build.sh
cp -r /tmp/openwrt/openwrt-imagebuilder-${TARGET/\//-}.Linux-${TARGET/\//_}/bin/targets/$TARGET artifacts-$VERSION
for f in $(find artifacts-$VERSION -iname '*.gz'); do
gpg -c --batch --yes --passphrase=${PASSWORD} $f
rm $f
done
- name: prepare-release-readme
run: |
mkdir artifacts-readme
cp .github/artifacts-release-readme.md artifacts-readme/README.md
sed -i 's!{RELEASE_DATE}!'$(date +'%Y/%m/%d')'!g' artifacts-readme/README.md
- name: release-artifacts
uses: pyTooling/Actions/releaser@r0
with:
tag: nightly
token: ${{ secrets.GITHUB_TOKEN }}
files: |
artifacts-*/*.gpg
artifacts-readme/README.md