1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Make creating releases automatic on merge of release PRs (#6353)

* Remove unused bundled-extensions file

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Remove unused release drafter workflow

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Tag releases created using create-release-pr with the release label

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Remove the unneeded tag-release script

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Add workflow for creating release on the merging of a release PR

Signed-off-by: Sebastian Malton <sebastian@malton.name>

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-10-07 10:03:49 -04:00 committed by GitHub
parent a6cdf2c3f0
commit 71962685ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 45 deletions

View File

@ -1,8 +0,0 @@
{
"extensions": [
"pod-menu",
"node-menu",
"metrics-cluster-feature",
"kube-object-event-status"
]
}

View File

@ -1,16 +0,0 @@
name: Release Drafter
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

30
.github/workflows/release.yml vendored Normal file
View File

@ -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 }}

View File

@ -296,6 +296,7 @@ const createPrArgs = [
"--base", prBase, "--base", prBase,
"--title", `Release ${newVersion.format()}`, "--title", `Release ${newVersion.format()}`,
"--label", "skip-changelog", "--label", "skip-changelog",
"--label", "release",
"--body-file", "-", "--body-file", "-",
]; ];

View File

@ -1,21 +0,0 @@
#!/bin/bash
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
-f|--force)
FORCE="--force"
shift # past argument
;;
esac
done
if [[ `git branch --show-current` =~ ^release/v ]]
then
VERSION_STRING=$(cat package.json | jq '.version' -r | xargs printf "v%s")
git tag ${VERSION_STRING} ${FORCE}
git push ${GIT_REMOTE:-origin} ${VERSION_STRING} ${FORCE}
else
echo "You must be in a release branch"
fi