Skip to content

Commit 0ece967

Browse files
committed
Add action to create latest build
1 parent c871ecc commit 0ece967

File tree

2 files changed

+45
-2
lines changed

2 files changed

+45
-2
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ on:
33
workflow_dispatch:
44
push:
55
pull_request:
6-
schedule:
7-
- cron: '0 3 * * *'
86
jobs:
97
build-modules:
108
# See: https://help.github.com/en/actions/reference/contexts-and-expression-syntax-for-github-actions#github-context

.github/workflows/build_latest.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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

Comments
 (0)