diff --git a/.github/workflows/build-module.yml b/.github/workflows/build-module.yml index aaa3d9a..5c45fb8 100644 --- a/.github/workflows/build-module.yml +++ b/.github/workflows/build-module.yml @@ -1,12 +1,13 @@ name: Create Release on Tag -# on: [workflow_dispatch] + on: - push: - tags: - - "v*.*.*" + release: + types: + - published jobs: generate-config: + if: github.event.release.tag_name =~ '^v[0-9]+\.[0-9]+\.[0-9]+$' # Условие для проверки формата тега runs-on: ubuntu-latest outputs: job-config: ${{ steps.generate-config.outputs.job-config }} diff --git a/.github/workflows/run-release.yml b/.github/workflows/run-release.yml index 7a7d66e..9b8c02e 100644 --- a/.github/workflows/run-release.yml +++ b/.github/workflows/run-release.yml @@ -35,19 +35,21 @@ jobs: if: steps.check_release.outputs.release_exists == 'false' run: | ART=" + ``` _______ ________ __ - | |.-----.-----.-----.| | | |.----.| |_ - | - || _ | -__| || | | || _|| _| - |_______|| __|_____|__|__||________||__| |____| + | |.-----.-----.-----.| | | |.----.| |_ + | - || _ | -__| || | | || _|| _| + |_______|| __|_____|__|__||________||__| |____| |__| A M N E Z I A W I R E G U A R D ----------------------------------------------------- OpenWrt ${{ steps.get_release.outputs.release_tag }} - -----------------------------------------------------" + ----------------------------------------------------- + ```" curl -X POST https://api.github.com/repos/Slava-Shchipunov/awg-openwrt/releases \ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Content-Type: application/json" \ -d "$(jq -n --arg tag "${{ steps.get_release.outputs.release_tag }}" \ --arg name "Build amnezia wg for all devices with openwrt ${{ steps.get_release.outputs.release_tag }}" \ - --arg body "$ART\n\nAutomatically created release for OpenWRT ${{ steps.get_release.outputs.release_tag }}." \ + --arg body "$ART" \ '{ tag_name: $tag, name: $name, body: $body }')" \ No newline at end of file