-
Notifications
You must be signed in to change notification settings - Fork 163
37 lines (35 loc) · 1.43 KB
/
perform-release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: "Perform Release"
on:
workflow_dispatch:
inputs:
new_version:
description: "Release Version (no 'v')"
required: true
type: string
jobs:
perform-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
with:
token: ${{ secrets.PAT }}
- name: Update Changelog
uses: thomaseizinger/[email protected]
with:
tag: v${{ github.event.inputs.new_version }}
version: ${{ github.event.inputs.new_version }}
- name: Update README
run: |
new_version=$(echo "${{ github.event.inputs.new_version }}")
stripped_version=$($new_version | sed -e 's/\.//g')
formatted_date=$(date "+%Y%m%d")
sed -i 's|\(Latest plugin version: \[\).*\(\](/CHANGELOG.md#\).*---.*)|\1'"$new_version"'\2'"$stripped_version"'---'"$formatted_date"')|' README.md
- name: Update VERSION_CURRENT
run: printf "${{ github.event.inputs.new_version }}\n" > plugin/VERSION_CURRENT.txt
- name: Perform Release Tagging and Push
# This will trigger the new release job that will take the tag and push the release to the plugin portal
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Release version ${{ github.event.inputs.new_version }}
tagging_message: 'v${{ github.event.inputs.new_version }}'