From d62dde8afc10cfd503ea1dcbf354333033aa8fc6 Mon Sep 17 00:00:00 2001 From: Yury Sannikov Date: Thu, 14 Dec 2023 05:16:07 +0300 Subject: [PATCH] release on tag --- .github/workflows/build-module.yml | 39 +++++++++--------------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build-module.yml b/.github/workflows/build-module.yml index 9e8b853a..d4bbaf61 100644 --- a/.github/workflows/build-module.yml +++ b/.github/workflows/build-module.yml @@ -1,9 +1,9 @@ -name: Release AmneziaWG Kernel Module -on: [workflow_dispatch] -# on: -# push: -# tags: -# - "v*.*.*" +name: Create Release on Tag +# on: [workflow_dispatch] +on: + push: + tags: + - "v*.*.*" jobs: build: @@ -104,34 +104,19 @@ jobs: - name: Prepare artifacts run: | - ls -al bin/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt || true - ls -al bin/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/packages/ || true - tag_name=${{ github.ref_name }} - tag_name=${tag_name:=test} - - echo "tag_name: ${tag_name}" - mkdir -p awgrelease - postfix="${tag_name}_${{ matrix.tag }}_${{ matrix.build_env.pkgarch}}_${{ matrix.build_env.target}}_${{ matrix.build_env.subtarget}}" - - echo "postfix: ${postfix}" - cp bin/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt/amnezia-wg-tools_*.ipk awgrelease/amnezia-wg-tools_${postfix}.ipk cp bin/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt/luci-app-amneziawg_*.ipk awgrelease/luci-app-amneziawg_${postfix}.ipk - cp bin/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/packages/kmod-amneziawg_*.ipk awgrelease/kmod-amneziawg_${postfix}.ipk - - ls -al awgrelease/ + cp bin/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/packages/kmod-amneziawg_*.ipk awgrelease/kmod-amneziawg_${postfix}.ipk + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: awgrelease/*.ipk - # - name: Release - # uses: softprops/action-gh-release@v1 - # with: - # files: | - # bin/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/packages/kmod-amneziawg*.ipk - - - name: Clenanup + - name: Cleanup run: | rm feeds.conf || true rm -rf awgrelease || true