feat: OBS-392 - semantic release bare bones for diode-sdk-go and diode-servers #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Server - release | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: [ release ] | |
paths: | |
- "diode-server/**" | |
env: | |
GH_TOKEN: ${{ secrets.ORB_CI_GH_TOKEN }} | |
SEMANTIC_RELEASE_PACKAGE: ${{ github.repository }} | |
APP_DIR: diode-server | |
jobs: | |
changed-dirs: | |
name: Changed dirs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set short SHA | |
id: short-sha | |
run: | | |
echo "short_sha=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT | |
- name: Get changed dirs | |
id: get-changed-dirs | |
run: | | |
echo "changed-dirs<<EOF" >> $GITHUB_OUTPUT | |
echo "$(git diff --name-only --diff-filter=ACMRTUXB $(git merge-base origin/${{ github.base_ref }} ${{ steps.short-sha.outputs.short_sha }}) ${{ steps.short-sha.outputs.short_sha }} | xargs dirname | sort -u)" >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
- name: Echo changed dirs | |
run: | | |
echo "changed-dirs: ${{ steps.get-changed-dirs.outputs.changed-dirs }}" |