From 0c32479b98109b512e6cdaf3426930b88315fc1c Mon Sep 17 00:00:00 2001 From: Ivan Starostin Date: Wed, 21 Oct 2026 14:40:22 +0300 Subject: [PATCH 1/2] add make release action --- .github/workflows/ci.yml | 15 ++++++++++ .github/workflows/make_release.yml | 45 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/workflows/make_release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4b8bb0..7af8afe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,6 +39,21 @@ jobs: echo Next version: $VERSION echo "VERSION=$VERSION" >> $GITHUB_OUTPUT + - name: Make version info file + run: | + cat > cli-version.json << EOF + { + "CLI": "${{steps.next-ver.output.VERSION}}" + } + EOF + + - name: Upload version info + uses: actions/upload-artifact@v4 + with: + name: cli-version.json + path: ${{ github.workspace }}/cli-version.json + if-no-files-found: error + build: name: Build and test needs: semver diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml new file mode 100644 index 0000000..16d74df --- /dev/null +++ b/.github/workflows/make_release.yml @@ -0,0 +1,45 @@ + +name: Release + +on: + + workflow_dispatch: + inputs: + target_branch: + description: 'Branch to run on' + required: true + default: 'main' +env: + LOCAL_ARTIFACTS: ${{ github.workspace }}/local_artifacts + +jobs: + + prepare: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Grab artifacts + uses: dawidd6/action-download-artifact@v11 + with: + github_token: ${{secrets.GITHUB_TOKEN}} + workflow: ci.yml + workflow_conclusion: completed + branch: main + path: ${{ env.LOCAL_ARTIFACTS }} + + - name: Detect versions + id: get-tag + run: | + TAG=$(jq -r '.CLI' ${{ env.LOCAL_ARTIFACTS }}/cli-version.json) + echo "TAG=v$TAG" >> $GITHUB_OUTPUT + + - name: Create release + uses: ncipollo/release-action@v1 + with: + artifacts: "${{ env.LOCAL_ARTIFACTS }}/*.zip" + generateReleaseNotes: true + draft: true + name: ${{ steps.get-tag.outputs.TAG}} + tag: ${{ steps.get-tag.outputs.TAG}} From be215a4b8ce2328bb0fbf3b4224f6c803d4578a6 Mon Sep 17 00:00:00 2001 From: IVNSTN Date: Wed, 21 Oct 2026 14:47:34 +0300 Subject: [PATCH 2/2] Potential fix for pull request finding 'CodeQL / Workflow does not contain permissions' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .github/workflows/make_release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index 16d74df..44aabf5 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -12,6 +12,10 @@ on: env: LOCAL_ARTIFACTS: ${{ github.workspace }}/local_artifacts +permissions: + contents: write + actions: read + jobs: prepare: