From 9ee63beb9a14f5d8ec2201f1d52a4201995096a4 Mon Sep 17 00:00:00 2001 From: Ivan Starostin Date: Wed, 21 Oct 2026 18:42:30 +0300 Subject: [PATCH] ci fix attempt --- .github/workflows/ci.yml | 8 +++++--- .github/workflows/make_release.yml | 26 +++++++++++++++++++------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7af8afe..a0b9856 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,10 @@ name: Build .NET lib +permissions: + contents: write + actions: read + on: push: branches: ["main"] @@ -39,11 +43,9 @@ 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}}" + "CLI": "$VERSION" } EOF diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index 44aabf5..f22d730 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -1,6 +1,10 @@  name: Release +permissions: + contents: write + actions: read + on: workflow_dispatch: @@ -12,10 +16,6 @@ on: env: LOCAL_ARTIFACTS: ${{ github.workspace }}/local_artifacts -permissions: - contents: write - actions: read - jobs: prepare: @@ -24,26 +24,38 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Grab artifacts + - name: Grab build artifacts uses: dawidd6/action-download-artifact@v11 with: github_token: ${{secrets.GITHUB_TOKEN}} + name: TeamTools.* + name_is_regexp: true workflow: ci.yml workflow_conclusion: completed branch: main + skip_unpack: true path: ${{ env.LOCAL_ARTIFACTS }} + - name: Grab cli-version artifact + uses: dawidd6/action-download-artifact@v11 + with: + github_token: ${{secrets.GITHUB_TOKEN}} + name: cli-version.json + workflow: ci.yml + workflow_conclusion: completed + branch: main + - name: Detect versions id: get-tag run: | - TAG=$(jq -r '.CLI' ${{ env.LOCAL_ARTIFACTS }}/cli-version.json) + TAG=$(jq -r '.CLI' '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 + generateReleaseNotes: false draft: true name: ${{ steps.get-tag.outputs.TAG}} tag: ${{ steps.get-tag.outputs.TAG}}