Skip to content

Commit

Permalink
Update alpha-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
donavanbecker committed Apr 26, 2024
1 parent 253dab4 commit 58ca9d7
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/alpha-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,6 @@ on:
workflow_dispatch:

jobs:
pre-release-alpha:
if: ${{ github.repository == 'homebridge/homebridge-config-ui-x' }}
name: "Pre Release Alpha"
needs: delete-alpha-tag
runs-on: "ubuntu-latest"
steps:
- name: Get latest alpha tag from npm
id: get_npm_version
run: echo "::set-output name=version::$(npm show homebridge-config-ui-x@alpha version)"

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: v${{ steps.get_npm_version.outputs.version }}
prerelease: true

delete-alpha-tag:
if: ${{ github.repository == 'homebridge/homebridge-config-ui-x' }}
name: delete-alpha-tag
runs-on: ubuntu-latest

steps:
- name: Get version from ${{ github.event_name }} tag
if: github.event_name == 'release'
id: get_version
uses: jannemattila/get-version-from-tag@v3

- name: Calculate previous alpha tag
if: github.event_name == 'release'
id: calculate_previous_alpha_tag
run: echo "::set-output name=previous_alpha_tag::$(echo ${{ steps.get_version.outputs.version }} | sed 's/alpha/alpha-1/')"

- name: Delete alpha release ${{ steps.get_version.outputs.version }}
if: github.event_name == 'release' && contains(github.ref, 'alpha')
uses: liudonghua123/delete-release-action@v1
with:
release_name: contains(${{ steps.calculate_previous_alpha_tag.outputs.previous_alpha_tag }}, 'alpha')

publish:
if: ${{ github.repository == 'homebridge/homebridge-config-ui-x' }}
uses: homebridge/.github/.github/workflows/npm-publish.yml@latest
Expand Down

0 comments on commit 58ca9d7

Please sign in to comment.