Skip to content
This repository was archived by the owner on Apr 27, 2023. It is now read-only.

Commit efbf659

Browse files
committed
use plugin version in release
1 parent 29efc40 commit efbf659

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: CI
22

33
on:
4-
push:
5-
branches:
6-
- main
74
pull_request:
85
branches:
96
- main

.github/workflows/release.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,25 @@ jobs:
133133
awk '/^## / {s++} s == 1 {print}' CHANGELOG.md > release_notes.md
134134
echo "::set-output name=path::release_notes.md"
135135
136+
- name: Create tag
137+
uses: actions/github-script@v5
138+
with:
139+
script: |
140+
github.rest.git.createRef({
141+
owner: context.repo.owner,
142+
repo: context.repo.repo,
143+
ref: 'refs/tags/v${{ steps.metadata.outputs.plugin-version }}',
144+
sha: context.sha
145+
})
146+
136147
- name: Create release
137148
id: create_release
138149
uses: actions/create-release@v1
139150
env:
140151
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141152
with:
142-
tag_name: ${{ github.ref }}
143-
release_name: Release ${{ github.ref }}
153+
tag_name: 'v${{ steps.metadata.outputs.plugin-version }}'
154+
release_name: Release ${{ steps.metadata.outputs.plugin-version }}
144155
body_path: ${{ steps.changelog.outputs.path }}
145156
draft: true
146157

0 commit comments

Comments
 (0)