Skip to content

Artifacts Release Nightly #448

Artifacts Release Nightly

Artifacts Release Nightly #448

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@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: setup-dependencies
run: |
pip3 install --user --upgrade cryptography emoji pycountry pytz pyyaml requests
- name: generate-proxy-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: 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: build-openwrt-stable
env:
PASSWORD: ${{ secrets.MASTER_PASSWORD }}
TARGET: x86/64
VERSION: '23.05.3'
REPOSITORY: https://downloads.openwrt.org
GCC_VERSION: 12.3.0_musl
WORK_DIR: ${{ github.workspace }}/openwrt
run: |
bash openwrt-builder/build.sh
cp -r ${WORK_DIR}/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: 13.2.0_musl
WORK_DIR: ${{ github.workspace }}/openwrt
run: |
bash openwrt-builder/build.sh
cp -r ${WORK_DIR}/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: release-artifacts
uses: pyTooling/Actions/releaser@r0
if: ${{ always() }}
with:
tag: nightly
token: ${{ secrets.GITHUB_TOKEN }}
files: |
artifacts-*/*.gpg
artifacts-readme/README.md