Skip to content

Commit

Permalink
only release on changes to konfig-dash
Browse files Browse the repository at this point in the history
  • Loading branch information
dphuang2 committed Nov 5, 2023
1 parent d310a7e commit ac90177
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,36 @@ on:
branches:
- main

jobs:
check_for_relevant_changes:
runs-on: ubuntu-latest
outputs:
shouldRun: ${{ steps.check_changes.outputs.shouldRun }}
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Get changed files
id: get_changed_files
uses: Ana06/[email protected]

- name: Check for changes in specific paths
id: check_changes
run: |
for file in ${{ steps.get_changed_files.outputs.all }}; do
if [[ $file =~ ^generator/konfig-dash/ && ! $file =~ \.md$ ]]; then
echo "shouldRun=true" >> "$GITHUB_OUTPUT"
exit 0
fi
done
concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
if: needs.check_for_relevant_changes.outputs.shouldRun == 'true'
env:
DIRECTORY: ./generator/konfig-dash
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down

0 comments on commit ac90177

Please sign in to comment.