Skip to content

Commit

Permalink
Build repo with release
Browse files Browse the repository at this point in the history
  • Loading branch information
Anonym-tsk committed Sep 8, 2024
1 parent c803207 commit c11560d
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 65 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ on:

permissions:
contents: write
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build_release:
Expand All @@ -35,7 +41,7 @@ jobs:
trim: true

- name: Build packages
run: make all
run: make packages

- name: Commit and push version file
run: |
Expand Down Expand Up @@ -107,3 +113,18 @@ jobs:
asset_path: ./out/nfqws-keenetic_${{ steps.version.outputs.content }}_all.ipk
asset_name: nfqws-keenetic_${{ steps.version.outputs.content }}_all.ipk
asset_content_type: application/octet-stream

- name: Make Packages
run: make repository

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./out/_pages

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
48 changes: 0 additions & 48 deletions .github/workflows/repository.yml

This file was deleted.

52 changes: 36 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ URL_MIPS := "https://raw.githubusercontent.com/bol-van/zapret/master/binaries/mi
URL_AARCH64 := "https://raw.githubusercontent.com/bol-van/zapret/master/binaries/aarch64/nfqws"
URL_ARMV7 := "https://raw.githubusercontent.com/bol-van/zapret/master/binaries/arm/nfqws"

.DEFAULT_GOAL := all
.DEFAULT_GOAL := packages

_clean:
rm -rf out/$(ARCH)
Expand Down Expand Up @@ -81,12 +81,14 @@ _end:
cd out/$(ARCH); tar czvf ../nfqws-keenetic_$(VERSION)_$(ARCHFULL).ipk control.tar.gz data.tar.gz debian-binary; cd ../..

_ipk-arch:
# Required args: ARCH, ARCHFULL
make _start
make _scripts
make _binary
make _end

_ipk-multi:
# Required args: ARCH, ARCHFULL
make _start
make _scripts-multi
make _binary-multi
Expand All @@ -107,25 +109,43 @@ armv7:
multi:
make ARCH=all ARCHFULL=all _ipk-multi

repository:
rm -rf out/_pages
mkdir -p out/_pages/all
_repository:
# Required args: ARCH, ARCHFULL
rm -rf out/_pages/$(ARCH)
mkdir -p out/_pages/$(ARCH)

cp "out/nfqws-keenetic_$(VERSION)_all.ipk" "out/_pages/all/"
cp "out/nfqws-keenetic_$(VERSION)_$(ARCHFULL).ipk" "out/_pages/$(ARCH)/"

echo "Package: nfqws-keenetic" > out/_pages/all/Packages
echo "Version: $(VERSION)" >> out/_pages/all/Packages
echo "Depends: busybox, iptables" >> out/_pages/all/Packages
echo "Section: net" >> out/_pages/all/Packages
echo "Architecture: all" >> out/_pages/all/Packages
echo "Filename: nfqws-keenetic_$(VERSION)_all.ipk" >> out/_pages/all/Packages
echo "Size: $(shell wc -c out/nfqws-keenetic_$(VERSION)_all.ipk | awk '{print $$1}')" >> out/_pages/all/Packages
echo "SHA256sum: $(shell sha256sum out/nfqws-keenetic_$(VERSION)_all.ipk | awk '{print $$1}')" >> out/_pages/all/Packages
echo "Description: NFQWS service" >> out/_pages/all/Packages
echo "Package: nfqws-keenetic" > out/_pages/$(ARCH)/Packages
echo "Version: $(VERSION)" >> out/_pages/$(ARCH)/Packages
echo "Depends: busybox, iptables" >> out/_pages/$(ARCH)/Packages
echo "Section: net" >> out/_pages/$(ARCH)/Packages
echo "Architecture: $(ARCHFULL)" >> out/_pages/$(ARCH)/Packages
echo "Filename: nfqws-keenetic_$(VERSION)_$(ARCHFULL).ipk" >> out/_pages/$(ARCH)/Packages
echo "Size: $(shell wc -c out/nfqws-keenetic_$(VERSION)_$(ARCHFULL).ipk | awk '{print $$1}')" >> out/_pages/$(ARCH)/Packages
echo "SHA256sum: $(shell sha256sum out/nfqws-keenetic_$(VERSION)_$(ARCHFULL).ipk | awk '{print $$1}')" >> out/_pages/$(ARCH)/Packages
echo "Description: NFQWS service" >> out/_pages/$(ARCH)/Packages

gzip -k out/_pages/all/Packages
gzip -k out/_pages/$(ARCH)/Packages

all: mipsel mips aarch64 armv7 multi
repo-mipsel:
make ARCH=mipsel ARCHFULL=mipsel-3.4 _repository

repo-mips:
make ARCH=mips ARCHFULL=mips-3.4 _repository

repo-aarch64:
make ARCH=aarch64 ARCHFULL=aarch64-3.10 _repository

repo-armv7:
make ARCH=armv7 ARCHFULL=armv7-3.2 _repository

repo-multi:
make ARCH=all ARCHFULL=all _repository

packages: mipsel mips aarch64 armv7 multi

repository: repo-mipsel repo-mips repo-aarch64 repo-armv7 repo-multi

clean:
rm -rf out/mipsel
Expand Down

0 comments on commit c11560d

Please sign in to comment.