From 4c0d8b19fe57f1dbdee64c3e7d11c548146430b0 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Fri, 7 Oct 2022 09:57:22 -0400 Subject: [PATCH] Add workflow for creating release on the merging of a release PR Signed-off-by: Sebastian Malton --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..b07b3a2929 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release Open Lens +on: + pull_request: + types: + - closed + branches: + - master + - release/v*.* +jobs: + release: + name: Release + if: ${{ github.event.pull_request.merged == 'true' && contains(github.event.pull_request.labels.*.name, 'release') }} + runs-on: ubuntu-latest + steps: + - name: Checkout Release from lens + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: butlerlogic/action-autotag@stable + id: tagger + with: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + tag_prefix: "v" + - uses: ncipollo/release-action@v1 + if: ${{ needs.tag.outputs.tagname != '' }} + with: + name: v${{ steps.open-lens-version.outputs.VERSION }} + commit: master + tag: v${{ steps.open-lens-version.outputs.VERSION }} + body: ${{ github.event.pull_request.body }}