Perform Release #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}' |