Create nightly-release.yml
[platform/core/csapi/tizenfx.git] / .github / workflows / nightly-release.yml
1 name: "Nightly Release"
2
3
4 on:
5   schedule:
6     - cron: '0 15 * * *'
7   workflow_dispatch:
8
9 env:
10   TARGET_BRANCHES: 'master API8'
11
12 jobs:
13   nightly:
14     runs-on: ubuntu-latest
15     steps:
16     - uses: actions/checkout@v2
17       with:
18         fetch-depth: 0
19
20     - name: Find Branches to Release
21       id: find-targets
22       run: |
23         TARGETS=""
24         # find branches without the version tag
25         for x in $TARGET_BRANCHES; do
26           tags=$(git tag --contains origin/$x)
27           for t in $tags; do
28             if [[ ! $t =~ v^[0-9]+\.[0-9]+\.[0-9]+ ]]; then
29               TARGETS="${TARGETS} $x"
30             fi
31           done
32         done
33         # remove duplicated branch names
34         TARGETS=$(printf "%q\n" $TARGETS | sort -u)
35         echo "::set-output name=targets::${TARGETS}"
36
37     - name: Test
38       run: |
39         echo ${{ steps.find-targets.outputs.targets }}