-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.63 KB
/
update_dependent_projects_alpha.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Update dependent projects (alpha)
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag_name:
description: 'Tag name'
required: false
prerelease:
description: 'Prerelease'
required: false
default: 'false'
env:
LIBRARY_NAME: "gisce/ooui"
jobs:
update-dependents:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- project: "gisce/react-ooui"
branch: "alpha"
steps:
- name: Set environment variables and check condition
run: |
TAG_NAME="${{ github.event.release.tag_name || github.event.inputs.tag_name }}"
PRERELEASE="${{ github.event.release.prerelease || github.event.inputs.prerelease }}"
if [ "$PRERELEASE" == "true" ] && [[ "$TAG_NAME" != *'-rc.'* ]] && [[ "$TAG_NAME" == *'-alpha.'* ]]; then
SHOULD_RUN="true"
else
SHOULD_RUN="false"
fi
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
echo "SHOULD_RUN=$SHOULD_RUN" >> $GITHUB_ENV
- name: Check Prerelease and Tag Version
if: env.SHOULD_RUN == 'true'
run: echo "Running update for tag ${{ env.TAG_NAME }}"
- name: Call Reusable Workflow for each project
if: env.SHOULD_RUN == 'true'
uses: gisce/[email protected]
with:
dependentProject: ${{ matrix.project }}
tagName: ${{ env.TAG_NAME }}
dependentProjectBranch: ${{ matrix.branch }}
libraryName: ${{ env.LIBRARY_NAME }}
githubToken: ${{ secrets.GH_PAT }}