1+ name : Build Development Release
2+ on :
3+ workflow_dispatch :
4+ schedule :
5+ - cron : ' 0 3 * * *'
6+ jobs :
7+ build-modules :
8+ # See: https://help.github.com/en/actions/reference/contexts-and-expression-syntax-for-github-actions#github-context
9+ # https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables
10+ if : github.repository == 'BimberLab/DiscvrLabKeyModules'
11+ runs-on : ubuntu-latest
12+ steps :
13+
14+ - name : " Find default branch"
15+ - uses : octokit/request-action@v2.x
16+ id : get_default_branch
17+ with :
18+ route : GET /repos/{owner}/{repo}
19+ owner : BimberLab
20+ repo : DiscvrLabKeyModules
21+ env :
22+ GITHUB_TOKEN : ${{ secrets.PAT }}
23+ - run : " Default branch: ${{ fromJson(steps.get_default_branch.outputs.data).default_branch }}"
24+
25+ - name : " Build DISCVR"
26+ if : github.ref == '/refs/heads/${{ fromJson(steps.get_default_branch.outputs.data).default_branch }}'
27+ uses : bimberlabinternal/DevOps/githubActions/discvr-build@master
28+ with :
29+ artifactory_user : ${{secrets.artifactory_user}}
30+ artifactory_password : ${{secrets.artifactory_password}}
31+ # NOTE: permissions are limited on the default secrets.GITHUB_TOKEN, including updating workflows, so use a personal access token
32+ github_token : ${{ secrets.PAT }}
33+
34+ # See: https://github.com/marketplace/actions/automatic-releases
35+ - name : Deploy Build
36+ if : github.ref == '/refs/heads/${{ fromJson(steps.get_default_branch.outputs.data).default_branch }}'
37+ - uses : " marvinpinto/action-automatic-releases@latest"
38+ with :
39+ repo_token : " ${{ secrets.PAT }}"
40+ automatic_release_tag : " latest"
41+ prerelease : true
42+ title : " DISCVR Development Build: ${{ fromJson(steps.get_default_branch.outputs.data).default_branch }}" "
43+ files: |
44+ /lkDist/discvr/*.tar.gz
45+ /lkDist/discvr/*.zip
0 commit comments