Skip to content

Commit

Permalink
Make creating releases automatic on merge of release PRs (lensapp#6353)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
Nokel81 authored Oct 7, 2022
1 parent a6cdf2c commit 7196268
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 45 deletions.
8 changes: 0 additions & 8 deletions .bundled-extensions.json

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/release-drafter.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
1 change: 1 addition & 0 deletions scripts/create-release-pr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ const createPrArgs = [
"--base", prBase,
"--title", `Release ${newVersion.format()}`,
"--label", "skip-changelog",
"--label", "release",
"--body-file", "-",
];

Expand Down
21 changes: 0 additions & 21 deletions scripts/tag-release.sh

This file was deleted.

0 comments on commit 7196268

Please sign in to comment.