diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 63ecd0b..385961c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -42,16 +42,15 @@ jobs: with: script: | const tag = context.ref.replace("refs/tags/", ""); - let release; try { // Get release for this tag - release = await github.rest.repos.getReleaseByTag({ + const release = await github.rest.repos.getReleaseByTag({ owner: context.repo.owner, repo: context.repo.repo, tag: tag, }); // Delete obsolete release - release = await github.rest.repos.deleteRelease({ + await github.rest.repos.deleteRelease({ owner: context.repo.owner, repo: context.repo.repo, release_id: release.data.id, @@ -59,25 +58,26 @@ jobs: } finally { // Create release for this tag - release = await github.rest.repos.createRelease({ + const release = await github.rest.repos.createRelease({ owner: context.repo.owner, repo: context.repo.repo, tag_name: tag, + draft: false, + prerelease: true, }); - } - - // Upload the release asset - const fs = require('fs'); - const patterns = ['/builder/bin/packages/x86_64/base/*wrtbwmon*.ipk'] - const globber = await glob.create(patterns.join('\n')) - for await (const file of globber.globGenerator()) { - await github.rest.repos.uploadReleaseAsset({ - owner: context.repo.owner, - repo: context.repo.repo, - release_id: release.data.id, - name: file.substr(file.lastIndexOf('/') + 1), - data: await fs.readFileSync(file) - }); + // Upload the release asset + const fs = require('fs'); + const patterns = ['/builder/bin/packages/x86_64/base/*wrtbwmon*.ipk'] + const globber = await glob.create(patterns.join('\n')) + for await (const file of globber.globGenerator()) { + await github.rest.repos.uploadReleaseAsset({ + owner: context.repo.owner, + repo: context.repo.repo, + release_id: release.data.id, + name: file.substr(file.lastIndexOf('/') + 1), + data: await fs.readFileSync(file) + }); + } } - name: Upload app if: ${{ ! (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/release-')) }} diff --git a/README.md b/README.md index 8695cbd..338ca16 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,9 @@ This repo provides yet another LuCI module for wrtbwmon, which has similar featu ## Downloading Openwrt 19.07 has been fully supported after commit: [ff4909d](https://github.com/brvphoenix/luci-app-wrtbwmon/tree/ff4909d8f5d06fee87f7ec5a365ac5dde6492130). -* `openwrt-19.07.3 ... latest`: [release-2.0.12](https://github.com/brvphoenix/luci-app-wrtbwmon/releases/download/release-2.0.11/luci-app-wrtbwmon_2.0.12_all.ipk) -* `openwrt-19.07.0 ... 19.07.2`: [release-2.0.7](https://github.com/brvphoenix/luci-app-wrtbwmon/releases/download/release-2.0.7/luci-app-wrtbwmon_2.0.7-1_all.ipk) -* `openwrt-18.06`: [release-1.6.3](https://github.com/brvphoenix/luci-app-wrtbwmon/releases/download/release-1.6.3/luci-app-wrtbwmon_1.6.3-1_all.ipk) +* `openwrt-19.07.3 ... latest`: [release-2.0.12](https://github.com/brvphoenix/luci-app-wrtbwmon/releases/tag/release-2.0.12) +* `openwrt-19.07.0 ... 19.07.2`: [release-2.0.7](https://github.com/brvphoenix/luci-app-wrtbwmon/releases/tag/release-2.0.7) +* `openwrt-18.06`: [release-1.6.3](https://github.com/brvphoenix/luci-app-wrtbwmon/releases/tag/release-1.6.3) After installing, you will see a new `Traffic status` menu item in the `Network` menu list in the LuCI Page.