Skip to content

Commit

Permalink
Improve GitHub Actions
Browse files Browse the repository at this point in the history
Improve the Release GitHub Actions
  • Loading branch information
donavanbecker committed Jan 3, 2024
1 parent affd3a7 commit 8577360
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,32 @@ name: Node Release
run-name: Production Release

on:
push:
branches:
- latest
- '!beta'
- '!beta-[0-9]+.[0-9]+.[0-9]'
- '!alpha'
- '!alpha-[0-9]+.[0-9]+.[0-9]'
tags:
= 'v[0-9]+.[0-9]+.[0-9]'
= '[0-9]+.[0-9]+.[0-9]'
workflow_dispatch:
release:
types: [released]

jobs:
tag:
name: Verify Release Tag
runs-on: ubuntu-latest
steps:
- name: Get Release Tag
id: get_version
uses: jannemattila/get-version-from-tag@v1
- name: Tag Info
run: |
echo "Release Tag: ${{github.ref}}"
echo "Latest Tag: ${{ steps.get_version.outputs.version }}"
- name: Tag Info Matches
if: endsWith(github.ref, steps.get_version.outputs.version )
run: |
echo Latest Tag matches Release tag
- name: Tag Info Doesn't Match
if: ${{ !endsWith(github.ref, steps.get_version.outputs.version ) }}
run: |
echo Latest Tag does not matches Release tag
exit 1
build_and_test:
needs: tag
name: Build and Test
if: ${{ github.repository == 'homebridge/homebridge-config-ui-x' }}
uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@latest
Expand All @@ -35,6 +47,7 @@ jobs:
npm_auth_token: ${{ secrets.npm_token }}
build:
needs: publish
if: ${{ github.repository == 'homebridge/homebridge-config-ui-x' }}
name: Attach Artifact
runs-on: ubuntu-latest

Expand Down

0 comments on commit 8577360

Please sign in to comment.