Skip to content

feat: OBS-392 - semantic release bare bones for diode-sdk-go and diode-servers #16

feat: OBS-392 - semantic release bare bones for diode-sdk-go and diode-servers

feat: OBS-392 - semantic release bare bones for diode-sdk-go and diode-servers #16

Workflow file for this run

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:
setup:
name: Setup
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.generate-matrix.outputs.matrix }}
short_sha: ${{ steps.set-sha.outputs.short_sha }}
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=$(git diff --name-only origin/${{ github.base_ref }} ${{ steps.short-sha.outputs.short_sha }} | sort -u | tr '\n' ';')" >> $GITHUB_OUTPUT
- name: Generate servers matrix
id: generate-matrix
run: ./generate_changed_servers_matrix.sh "${{ steps.get-changed-dirs.outputs.changed-dirs }}"
- name: Echo test
run: |
echo "changed-dirs: ${{ steps.get-changed-dirs.outputs.changed-dirs }}"
echo "matrix: ${{ steps.generate-matrix.outputs.matrix }}"