1
0

build.yml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  1. name: Build
  2. on:
  3. push:
  4. branches-ignore:
  5. - 'weblate'
  6. paths:
  7. - "app/**/*.js"
  8. - "app/**/*.ts"
  9. - "app/**/*.vue"
  10. - "app/src/language/**/*.po"
  11. - "app/i18n.json"
  12. - "app/package.json"
  13. - "app/.env*"
  14. - "**/*.go"
  15. - "go.mod"
  16. - "go.sum"
  17. - ".github/workflows/build*.yml"
  18. - "resources/docker/docker/*"
  19. - "resources/development/*"
  20. - "resources/demo/*"
  21. - "Dockerfile"
  22. - "demo.Dockerfile"
  23. pull_request:
  24. types: [ opened, synchronize, reopened ]
  25. paths:
  26. - "**/*.js"
  27. - "**/*.vue"
  28. - "app/package.json"
  29. - "app/.env*"
  30. - "**/*.go"
  31. - "go.mod"
  32. - "go.sum"
  33. - ".github/workflows/*.yml"
  34. - "resources/docker/docker/*"
  35. - "resources/development/*"
  36. - "resources/demo/*"
  37. release:
  38. types:
  39. - published
  40. jobs:
  41. build_app:
  42. runs-on: macos-14
  43. steps:
  44. - name: Checkout
  45. uses: actions/checkout@v4
  46. - name: Set up nodejs
  47. uses: actions/setup-node@v4
  48. with:
  49. node-version: current
  50. - name: Install dependencies
  51. run: |
  52. corepack enable
  53. corepack prepare pnpm@latest --activate
  54. pnpm install
  55. working-directory: app
  56. - name: Check frontend code style
  57. run: |
  58. pnpm run lint
  59. working-directory: app
  60. - name: Check frontend types
  61. run: |
  62. pnpm run typecheck
  63. working-directory: app
  64. - name: Build
  65. run: |
  66. npx update-browserslist-db@latest
  67. pnpm build
  68. working-directory: app
  69. - name: Archive app artifacts
  70. uses: actions/upload-artifact@v4
  71. with:
  72. name: app-dist
  73. path: app/dist
  74. - name: Prepare publish
  75. if: github.event_name == 'release'
  76. run: |
  77. cp README*.md app/dist
  78. find app/dist -printf '%P\n' | tar -C app/dist --no-recursion -zcvf app-dist.tar.gz -T -
  79. - name: Publish
  80. uses: softprops/action-gh-release@v2
  81. if: github.event_name == 'release'
  82. with:
  83. files: app-dist.tar.gz
  84. build:
  85. runs-on: ubuntu-latest
  86. needs: build_app
  87. strategy:
  88. matrix:
  89. goos: [ linux, darwin, windows ]
  90. goarch: [ amd64, 386, arm64 ]
  91. exclude:
  92. # Exclude i386 on darwin.
  93. - goarch: 386
  94. goos: darwin
  95. include:
  96. # BEGIN Linux ARM 5 6 7
  97. - goos: linux
  98. goarch: arm
  99. goarm: 7
  100. - goos: linux
  101. goarch: arm
  102. goarm: 6
  103. - goos: linux
  104. goarch: arm
  105. goarm: 5
  106. # END Linux ARM 5 6 7
  107. - goos: linux
  108. goarch: riscv64
  109. - goos: linux
  110. goarch: loong64
  111. # BEGIN MIPS
  112. - goos: linux
  113. goarch: mips64
  114. - goos: linux
  115. goarch: mips64le
  116. - goos: linux
  117. goarch: mipsle
  118. - goos: linux
  119. goarch: mips
  120. # END MIPS
  121. env:
  122. CGO_ENABLED: 1
  123. GOOS: ${{ matrix.goos }}
  124. GOARCH: ${{ matrix.goarch }}
  125. GOARM: ${{ matrix.goarm }}
  126. steps:
  127. - name: Checkout
  128. uses: actions/checkout@v4
  129. - name: Set up Go
  130. uses: actions/setup-go@v5
  131. with:
  132. go-version: ^1.24.5
  133. cache: false
  134. - name: Setup environment
  135. id: info
  136. run: |
  137. export _NAME=$(jq ".$GOOS[\"$GOARCH$GOARM\"].name" -r < .github/build/build_info.json)
  138. export _ARCH=$(jq ".$GOOS[\"$GOARCH$GOARM\"].arch" -r < .github/build/build_info.json)
  139. export _ABI=$(jq ".$GOOS[\"$GOARCH$GOARM\"].abi // \"\"" -r < .github/build/build_info.json)
  140. export _ARTIFACT=nginx-ui-$GOOS-$GOARCH$(if [[ "$GOARM" ]]; then echo "v$GOARM"; fi)
  141. export _BINARY=nginx-ui$(if [[ "$GOOS" == "windows" ]]; then echo ".exe"; fi)
  142. echo "GOOS: $GOOS, GOARCH: $GOARCH, GOARM: $GOARM, ABI: $_ABI, RELEASE_NAME: $_NAME, ARTIFACT_NAME: $_ARTIFACT, BINARY_NAME: $_BINARY"
  143. echo "CACHE_NAME=$_NAME" >> $GITHUB_ENV
  144. echo "ARCH_NAME=$_ARCH" >> $GITHUB_ENV
  145. echo "ABI=$_ABI" >> $GITHUB_ENV
  146. echo "DIST=nginx-ui-$_NAME" >> $GITHUB_ENV
  147. echo "ARTIFACT=$_ARTIFACT" >> $GITHUB_ENV
  148. echo "BINARY_NAME=$_BINARY" >> $GITHUB_ENV
  149. - name: Setup Go modules cache
  150. uses: actions/cache@v4
  151. with:
  152. path: |
  153. ~/go/pkg/mod
  154. key: go-${{ runner.os }}-${{ runner.arch }}-mod-${{ hashFiles('go.mod') }}
  155. restore-keys: |
  156. go-${{ runner.os }}-${{ runner.arch }}-mod-
  157. - name: Setup Go build cache
  158. uses: actions/cache@v4
  159. with:
  160. path: |
  161. ~/.cache/go-build
  162. key: go-${{ runner.os }}-${{ runner.arch }}-${{ env.CACHE_NAME }}-${{ hashFiles('go.mod') }}
  163. restore-keys: |
  164. go-${{ runner.os }}-${{ runner.arch }}-${{ env.CACHE_NAME }}-
  165. - name: Download app artifacts
  166. uses: actions/download-artifact@v4
  167. with:
  168. name: app-dist
  169. path: app/dist
  170. - name: Generate files
  171. env:
  172. GOOS: linux
  173. GOARCH: amd64
  174. run: go generate cmd/version/generate.go
  175. - name: Install musl cross compiler
  176. if: env.GOOS == 'linux'
  177. uses: nginxui/musl-cross-compilers@v1
  178. id: musl
  179. with:
  180. target: ${{ env.ARCH_NAME }}-linux-musl${{ env.ABI }}
  181. variant: ${{ env.GOARCH == 'loong64' && 'userdocs/qbt-musl-cross-make' || 'richfelker/musl-cross-make' }}
  182. - name: Post install musl cross compiler
  183. if: env.GOOS == 'linux'
  184. run: |
  185. echo "PATH=${{ steps.musl.outputs.path }}:$PATH" >> $GITHUB_ENV
  186. echo "CC=${{ env.ARCH_NAME }}-linux-musl${{ env.ABI }}-gcc" >> $GITHUB_ENV
  187. echo "CXX=${{ env.ARCH_NAME }}-linux-musl${{ env.ABI }}-g++" >> $GITHUB_ENV
  188. echo "LD_FLAGS=-w --extldflags '-static'" >> $GITHUB_ENV
  189. - name: Install darwin cross compiler
  190. if: env.GOOS == 'darwin'
  191. run: |
  192. curl -L https://github.com/Hintay/crossosx/releases/latest/download/crossosx.tar.zst -o crossosx.tar.zst
  193. tar xvaf crossosx.tar.zst
  194. echo "LD_LIBRARY_PATH=$(pwd)/crossosx/lib/" >> $GITHUB_ENV
  195. echo "PATH=$(pwd)/crossosx/bin/:$PATH" >> $GITHUB_ENV
  196. echo "CC=${{ env.ARCH_NAME }}-clang" >> $GITHUB_ENV
  197. echo "CXX=${{ env.ARCH_NAME }}-clang++" >> $GITHUB_ENV
  198. echo "LD_FLAGS=-w" >> $GITHUB_ENV
  199. - name: Setup for Windows
  200. if: env.GOOS == 'windows'
  201. run: |
  202. echo "LD_FLAGS=-w" >> $GITHUB_ENV
  203. echo "CGO_ENABLED=1" >> $GITHUB_ENV
  204. # Install cross compilers based on architecture
  205. sudo apt-get update
  206. sudo apt-get install -y zip
  207. if [[ "$GOARCH" == "amd64" ]]; then
  208. echo "Installing x86_64 Windows cross compiler"
  209. sudo apt-get install -y gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64
  210. echo "CC=x86_64-w64-mingw32-gcc" >> $GITHUB_ENV
  211. echo "CXX=x86_64-w64-mingw32-g++" >> $GITHUB_ENV
  212. elif [[ "$GOARCH" == "386" ]]; then
  213. echo "Installing i686 Windows cross compiler"
  214. sudo apt-get install -y gcc-mingw-w64-i686 g++-mingw-w64-i686
  215. echo "CC=i686-w64-mingw32-gcc" >> $GITHUB_ENV
  216. echo "CXX=i686-w64-mingw32-g++" >> $GITHUB_ENV
  217. elif [[ "$GOARCH" == "arm64" ]]; then
  218. echo "Installing ARM64 Windows cross compiler"
  219. # Ubuntu's apt repositories don't have mingw for ARM64
  220. # Use llvm-mingw project instead
  221. mkdir -p $HOME/llvm-mingw
  222. wget -q https://github.com/mstorsjo/llvm-mingw/releases/download/20231128/llvm-mingw-20231128-ucrt-ubuntu-20.04-x86_64.tar.xz
  223. tar xf llvm-mingw-20231128-ucrt-ubuntu-20.04-x86_64.tar.xz -C $HOME/llvm-mingw --strip-components=1
  224. echo "PATH=$HOME/llvm-mingw/bin:$PATH" >> $GITHUB_ENV
  225. echo "CC=aarch64-w64-mingw32-clang" >> $GITHUB_ENV
  226. echo "CXX=aarch64-w64-mingw32-clang++" >> $GITHUB_ENV
  227. else
  228. echo "Unsupported Windows architecture: $GOARCH"
  229. exit 1
  230. fi
  231. - name: Build
  232. run: |
  233. mkdir -p dist
  234. go build -trimpath -tags=jsoniter -ldflags "$LD_FLAGS -X 'github.com/0xJacky/Nginx-UI/settings.buildTime=$(date +%s)'" -o dist/$BINARY_NAME -v main.go
  235. - name: Archive backend artifacts
  236. uses: actions/upload-artifact@v4
  237. with:
  238. name: ${{ env.ARTIFACT }}
  239. path: dist/${{ env.BINARY_NAME }}
  240. - name: Prepare publish
  241. run: |
  242. cp README*.md ./dist
  243. find dist -printf '%P\n' | tar -C dist --no-recursion -zcvf ${{ env.DIST }}.tar.gz -T -
  244. openssl dgst -sha512 ${{ env.DIST }}.tar.gz | sed 's/([^)]*)//g' | awk '{print $NF}' >> ${{ env.DIST }}.tar.gz.digest
  245. # Create zip for Windows builds (for winget compatibility)
  246. if [[ "$GOOS" == "windows" ]]; then
  247. cd dist
  248. zip -r ../${{ env.DIST }}.zip .
  249. cd ..
  250. openssl dgst -sha512 ${{ env.DIST }}.zip | sed 's/([^)]*)//g' | awk '{print $NF}' >> ${{ env.DIST }}.zip.digest
  251. fi
  252. - name: Publish
  253. uses: softprops/action-gh-release@v2
  254. if: github.event_name == 'release'
  255. with:
  256. files: |
  257. ${{ env.DIST }}.tar.gz
  258. ${{ env.DIST }}.tar.gz.digest
  259. ${{ env.GOOS == 'windows' && format('{0}.zip', env.DIST) || '' }}
  260. ${{ env.GOOS == 'windows' && format('{0}.zip.digest', env.DIST) || '' }}
  261. - name: Upload to R2 using S3 API
  262. if: github.event_name != 'pull_request' && github.ref == 'refs/heads/dev'
  263. env:
  264. AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
  265. AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
  266. AWS_REGION: us-east-1
  267. run: |
  268. echo "Uploading ${{ env.DIST }}.tar.gz to R2..."
  269. aws s3 cp ./${{ env.DIST }}.tar.gz s3://nginx-ui-dev-build/${{ env.DIST }}.tar.gz --endpoint-url=${{ secrets.R2_S3_API_ENDPOINT }}
  270. echo "Uploading ${{ env.DIST }}.tar.gz.digest to R2..."
  271. aws s3 cp ./${{ env.DIST }}.tar.gz.digest s3://nginx-ui-dev-build/${{ env.DIST }}.tar.gz.digest --endpoint-url=${{ secrets.R2_S3_API_ENDPOINT }}
  272. echo "Upload completed successfully"
  273. docker-build:
  274. if: github.event_name != 'pull_request'
  275. runs-on: ubuntu-latest
  276. needs: build
  277. env:
  278. PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6,linux/arm/v5
  279. steps:
  280. - name: Checkout
  281. uses: actions/checkout@v4
  282. - name: Docker meta
  283. id: meta
  284. uses: docker/metadata-action@v5
  285. with:
  286. images: |
  287. uozi/nginx-ui
  288. tags: |
  289. type=schedule
  290. type=ref,event=branch
  291. type=semver,pattern={{version}}
  292. type=semver,pattern={{raw}}
  293. type=sha
  294. type=raw,value=latest,enable=${{ github.event_name == 'release' && !github.event.release.prerelease }}
  295. - name: Download artifacts
  296. uses: actions/download-artifact@v4
  297. with:
  298. path: ./dist
  299. - name: Prepare Artifacts
  300. run: chmod +x ./dist/nginx-ui-*/nginx-ui*
  301. - name: Set up Docker Buildx
  302. id: buildx
  303. uses: docker/setup-buildx-action@v3
  304. - name: Login to DockerHub
  305. uses: docker/login-action@v3
  306. with:
  307. username: ${{ secrets.DOCKERHUB_USER }}
  308. password: ${{ secrets.DOCKERHUB_TOKEN }}
  309. - name: Prepare Dockerfile
  310. run: |
  311. cp ./Dockerfile ./dist
  312. cp -rp ./resources ./dist
  313. - name: Build and push
  314. uses: docker/build-push-action@v6
  315. with:
  316. context: ./dist
  317. file: ./dist/Dockerfile
  318. platforms: ${{ env.PLATFORMS }}
  319. push: ${{ github.event_name != 'pull_request' }}
  320. tags: ${{ steps.meta.outputs.tags }}
  321. labels: ${{ steps.meta.outputs.labels }}
  322. - name: Prepare Demo Dockerfile
  323. run: |
  324. cp ./demo.Dockerfile ./dist
  325. cp -rp ./resources ./dist
  326. - name: Build and push demo
  327. uses: docker/build-push-action@v6
  328. if: github.ref == 'refs/heads/dev'
  329. with:
  330. context: ./dist
  331. file: ./dist/demo.Dockerfile
  332. platforms: ${{ env.PLATFORMS }}
  333. push: 'true'
  334. tags: |
  335. uozi/nginx-ui-demo:latest
  336. update-homebrew:
  337. runs-on: ubuntu-latest
  338. needs: build
  339. if: github.event_name == 'release'
  340. steps:
  341. - name: Checkout
  342. uses: actions/checkout@v4
  343. - name: Get release info
  344. id: release
  345. run: |
  346. echo "tag_name=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
  347. echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
  348. - name: Download release assets and calculate SHA256 checksums
  349. id: checksums
  350. run: |
  351. VERSION="${{ steps.release.outputs.version }}"
  352. TAG_NAME="${{ steps.release.outputs.tag_name }}"
  353. # Download binary files from releases and calculate SHA256
  354. mkdir -p downloads
  355. # macOS Intel
  356. wget -O downloads/nginx-ui-macos-64.tar.gz "https://github.com/${{ github.repository }}/releases/download/$TAG_NAME/nginx-ui-macos-64.tar.gz"
  357. MACOS_INTEL_SHA256=$(sha256sum downloads/nginx-ui-macos-64.tar.gz | cut -d' ' -f1)
  358. # macOS ARM
  359. wget -O downloads/nginx-ui-macos-arm64-v8a.tar.gz "https://github.com/${{ github.repository }}/releases/download/$TAG_NAME/nginx-ui-macos-arm64-v8a.tar.gz"
  360. MACOS_ARM_SHA256=$(sha256sum downloads/nginx-ui-macos-arm64-v8a.tar.gz | cut -d' ' -f1)
  361. # Linux Intel
  362. wget -O downloads/nginx-ui-linux-64.tar.gz "https://github.com/${{ github.repository }}/releases/download/$TAG_NAME/nginx-ui-linux-64.tar.gz"
  363. LINUX_INTEL_SHA256=$(sha256sum downloads/nginx-ui-linux-64.tar.gz | cut -d' ' -f1)
  364. # Linux ARM
  365. wget -O downloads/nginx-ui-linux-arm64-v8a.tar.gz "https://github.com/${{ github.repository }}/releases/download/$TAG_NAME/nginx-ui-linux-arm64-v8a.tar.gz"
  366. LINUX_ARM_SHA256=$(sha256sum downloads/nginx-ui-linux-arm64-v8a.tar.gz | cut -d' ' -f1)
  367. echo "macos_intel_sha256=$MACOS_INTEL_SHA256" >> $GITHUB_OUTPUT
  368. echo "macos_arm_sha256=$MACOS_ARM_SHA256" >> $GITHUB_OUTPUT
  369. echo "linux_intel_sha256=$LINUX_INTEL_SHA256" >> $GITHUB_OUTPUT
  370. echo "linux_arm_sha256=$LINUX_ARM_SHA256" >> $GITHUB_OUTPUT
  371. - name: Generate Homebrew Formula
  372. id: formula
  373. run: |
  374. VERSION="${{ steps.release.outputs.version }}"
  375. cat > nginx-ui.rb << 'EOF'
  376. class NginxUi < Formula
  377. desc "Yet another Nginx Web UI"
  378. homepage "https://github.com/0xJacky/nginx-ui"
  379. version "${{ steps.release.outputs.version }}"
  380. license "AGPL-3.0"
  381. on_macos do
  382. on_intel do
  383. url "https://github.com/0xJacky/nginx-ui/releases/download/v#{version}/nginx-ui-macos-64.tar.gz"
  384. sha256 "${{ steps.checksums.outputs.macos_intel_sha256 }}"
  385. end
  386. on_arm do
  387. url "https://github.com/0xJacky/nginx-ui/releases/download/v#{version}/nginx-ui-macos-arm64-v8a.tar.gz"
  388. sha256 "${{ steps.checksums.outputs.macos_arm_sha256 }}"
  389. end
  390. end
  391. on_linux do
  392. on_intel do
  393. url "https://github.com/0xJacky/nginx-ui/releases/download/v#{version}/nginx-ui-linux-64.tar.gz"
  394. sha256 "${{ steps.checksums.outputs.linux_intel_sha256 }}"
  395. end
  396. on_arm do
  397. url "https://github.com/0xJacky/nginx-ui/releases/download/v#{version}/nginx-ui-linux-arm64-v8a.tar.gz"
  398. sha256 "${{ steps.checksums.outputs.linux_arm_sha256 }}"
  399. end
  400. end
  401. def install
  402. bin.install "nginx-ui"
  403. # Create configuration directory
  404. (etc/"nginx-ui").mkpath
  405. # Create default configuration file if it doesn't exist
  406. config_file = etc/"nginx-ui/app.ini"
  407. unless config_file.exist?
  408. config_file.write <<~EOS
  409. [app]
  410. PageSize = 10
  411. [server]
  412. Host = 0.0.0.0
  413. Port = 9000
  414. RunMode = release
  415. [cert]
  416. HTTPChallengePort = 9180
  417. [terminal]
  418. StartCmd = login
  419. EOS
  420. end
  421. # Create data directory
  422. (var/"nginx-ui").mkpath
  423. end
  424. def post_install
  425. # Ensure correct permissions
  426. (var/"nginx-ui").chmod 0755
  427. end
  428. service do
  429. run [opt_bin/"nginx-ui", "serve", "--config", etc/"nginx-ui/app.ini"]
  430. keep_alive true
  431. working_dir var/"nginx-ui"
  432. log_path var/"log/nginx-ui.log"
  433. error_log_path var/"log/nginx-ui.err.log"
  434. end
  435. test do
  436. assert_match version.to_s, shell_output("#{bin}/nginx-ui --version")
  437. end
  438. end
  439. EOF
  440. echo "Generated Homebrew Formula:"
  441. cat nginx-ui.rb
  442. - name: Checkout homebrew-tools repository
  443. uses: actions/checkout@v4
  444. with:
  445. repository: 0xJacky/homebrew-tools
  446. path: homebrew-tools
  447. token: ${{ secrets.HOMEBREW_GITHUB_TOKEN }}
  448. - name: Update Formula file
  449. run: |
  450. # Copy the generated formula to the correct location
  451. mkdir -p homebrew-tools/Formula/
  452. cp nginx-ui.rb homebrew-tools/Formula/nginx-ui.rb
  453. - name: Verify Formula
  454. run: |
  455. cd homebrew-tools
  456. # Basic syntax check
  457. ruby -c Formula/nginx-ui.rb
  458. echo "Formula syntax is valid"
  459. - name: Create Pull Request to homebrew-tools
  460. uses: peter-evans/create-pull-request@v7
  461. with:
  462. token: ${{ secrets.HOMEBREW_GITHUB_TOKEN }}
  463. path: homebrew-tools
  464. branch: update-nginx-ui-${{ steps.release.outputs.version }}
  465. delete-branch: true
  466. title: 'nginx-ui ${{ steps.release.outputs.version }}'
  467. body: |
  468. Update nginx-ui to version ${{ steps.release.outputs.version }}
  469. **Release Notes:**
  470. - Version: ${{ steps.release.outputs.version }}
  471. - Release URL: https://github.com/${{ github.repository }}/releases/tag/${{ steps.release.outputs.tag_name }}
  472. **Checksums (SHA256):**
  473. - macOS Intel: ${{ steps.checksums.outputs.macos_intel_sha256 }}
  474. - macOS ARM: ${{ steps.checksums.outputs.macos_arm_sha256 }}
  475. - Linux Intel: ${{ steps.checksums.outputs.linux_intel_sha256 }}
  476. - Linux ARM: ${{ steps.checksums.outputs.linux_arm_sha256 }}
  477. ---
  478. This PR was automatically generated by GitHub Actions.
  479. commit-message: 'nginx-ui ${{ steps.release.outputs.version }}'
  480. committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  481. author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  482. add-paths: |
  483. Formula/nginx-ui.rb
  484. publish-winget:
  485. runs-on: windows-latest
  486. needs: build
  487. if: github.event_name == 'release'
  488. steps:
  489. - name: Checkout
  490. uses: actions/checkout@v4
  491. - name: Publish to WinGet
  492. uses: vedantmgoyal9/winget-releaser@v2
  493. with:
  494. identifier: 0xJacky.nginx-ui
  495. max-versions-to-keep: 5
  496. token: ${{ secrets.HOMEBREW_GITHUB_TOKEN }}
  497. installers-regex: 'nginx-ui-windows.*\.zip$'