From efbf6591ad7d3d183da07bdf1a4060c1dba04a70 Mon Sep 17 00:00:00 2001 From: eduardo aleixo Date: Mon, 20 Dec 2021 16:40:17 -0300 Subject: [PATCH] use plugin version in release --- .github/workflows/ci.yml | 3 --- .github/workflows/release.yml | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2bd55a8..301d8ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,6 @@ name: CI on: - push: - branches: - - main pull_request: branches: - main diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 46c2bf8..40ea16d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -133,14 +133,25 @@ jobs: awk '/^## / {s++} s == 1 {print}' CHANGELOG.md > release_notes.md echo "::set-output name=path::release_notes.md" + - name: Create tag + uses: actions/github-script@v5 + with: + script: | + github.rest.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: 'refs/tags/v${{ steps.metadata.outputs.plugin-version }}', + sha: context.sha + }) + - name: Create release id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} + tag_name: 'v${{ steps.metadata.outputs.plugin-version }}' + release_name: Release ${{ steps.metadata.outputs.plugin-version }} body_path: ${{ steps.changelog.outputs.path }} draft: true