Skip to content

Commit a601ecd

Browse files
committed
Update github actions for latest tag
1 parent beee538 commit a601ecd

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@ jobs:
4040
# Only generate the distribution if this is the default branch
4141
GENERATE_DIST: ${{ env.DEFAULT_BRANCH == github.ref_name && '1' || '0' }}
4242

43-
- name: Publish Release
43+
- name: Publish Latest Release
4444
id: publish-release
4545
if: ${{ env.DEFAULT_BRANCH == github.ref_name && github.event_name == 'push' && github.base_ref == '' }}
4646
env:
4747
GH_TOKEN: "${{ secrets.PAT }}"
4848
run: |
49+
cd /github/home/labkey_build/23.7/server/modules/DiscvrLabKeyModules
4950
COUNT=$(gh release list | grep 'latest' | wc -l)
5051
if [ $COUNT != '0' ];then gh release delete 'latest' --cleanup-tag -y; fi
5152

.github/workflows/build_latest.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,18 @@ jobs:
3636
env:
3737
GENERATE_DIST: 1
3838

39-
# See: https://github.com/marketplace/actions/automatic-releases
40-
- name: Deploy Build
41-
if: ${{ env.DEFAULT_BRANCH == github.ref_name }}
42-
uses: "marvinpinto/action-automatic-releases@latest"
43-
with:
44-
repo_token: "${{ secrets.PAT }}"
45-
automatic_release_tag: "latest"
46-
prerelease: true
47-
title: "Development Build: ${{ fromJson(steps.get_default_branch.outputs.data).default_branch }}"
48-
files: /home/runner/work/_temp/_github_home/lkDist/discvr/DISCVR-*
39+
- name: Publish Latest Release
40+
id: publish-release
41+
if: ${{ env.DEFAULT_BRANCH == github.ref_name && github.event_name == 'push' && github.base_ref == '' }}
42+
env:
43+
GH_TOKEN: "${{ secrets.PAT }}"
44+
run: |
45+
cd /github/home/labkey_build/23.7/server/modules/DiscvrLabKeyModules
46+
COUNT=$(gh release list | grep 'latest' | wc -l)
47+
if [ $COUNT != '0' ];then gh release delete 'latest' --cleanup-tag -y; fi
48+
49+
git tag "latest"
50+
git push -f origin "latest"
51+
52+
gh release create 'latest' --verify-tag --generate-notes --prerelease --title: "Development Build: ${{ env.DEFAULT_BRANCH }}"
53+
gh release upload 'latest' /home/runner/work/_temp/_github_home/lkDist/discvr/DISCVR-*

0 commit comments

Comments
 (0)