From dbc44b4fc4f904ee43516f5216e4af1f7e134976 Mon Sep 17 00:00:00 2001 From: Paul McDonald Date: Wed, 13 Nov 2024 00:03:42 +0000 Subject: [PATCH] Add workflow --- .github/workflows/release.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..c54e7c7 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,27 @@ +name: Create Release + +on: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Read version from plugin.yaml + id: read_version + run: | + version=$(grep '^version:' plugin.yaml | awk '{print $2}') + echo "::set-output name=version::$version" + + - name: Create git tag + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git tag -a "v${{ steps.read_version.outputs.version }}" -m "Release version ${{ steps.read_version.outputs.version }}" + git push origin "v${{ steps.read_version.outputs.version }}"