Skip to content

Commit

Permalink
Create a pre release on each push, clear any previous pre-releases wi…
Browse files Browse the repository at this point in the history
…th their tags.

Change-Id: I2f53e5f4819ba4e1c43355a2d73c1c6c1d22072d
  • Loading branch information
mtlljm committed Nov 3, 2023
1 parent bb88da6 commit a1b3aa8
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:
inputs:
release:
description: 'Make this a release build'
description: 'Skip pre release build'
required: false
type: boolean

Expand Down Expand Up @@ -56,16 +56,25 @@ jobs:
path: ./sasesp-plugin*.zip
retention-days: 14

- name: Clean pre releases
uses: dev-drprasad/delete-older-releases@v0.3.2
if: ${{ !inputs.release }}
with:
delete_tags: true
delete_prerelease_only: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Bump version and push tag
if: ${{ inputs.release }}
if: ${{ !inputs.release }}
id: release_version
uses: mathieudutour/github-tag-action@v6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_release_rules: feat:patch,bump:minor

- name: Create a GitHub release
if: ${{ inputs.release }}
if: ${{ !inputs.release }}
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.release_version.outputs.new_tag }}
Expand Down

0 comments on commit a1b3aa8

Please sign in to comment.