Skip to content

Commit

Permalink
github actions release workflow overwrite assets for alphas
Browse files Browse the repository at this point in the history
  • Loading branch information
Die4Ever committed Mar 28, 2024
1 parent a1426cc commit 52a8a63
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: "pre-release"

# not currently in use
on:
push:
branches: ["develop"] # TODO: change this to master when ready
branches: ["master"]
paths: ['*', 'installer/**', '.github/**']

jobs:
Expand Down
33 changes: 19 additions & 14 deletions .github/workflows/release-installer.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: release-installer
'on':

on:
release:
types:
- published
Expand Down Expand Up @@ -38,6 +39,7 @@ jobs:
file: installer/dist/DXRandoInstaller.exe
asset_name: DXRandoInstaller.exe
tag: ${{ env.RELEASE_TAG }}
overwrite: true

- name: Upload Release Asset BingoViewer
id: upload-release-asset-bingoviewer
Expand All @@ -47,6 +49,7 @@ jobs:
file: installer/dist/BingoViewer.exe
asset_name: BingoViewer.exe
tag: ${{ env.RELEASE_TAG }}
overwrite: true

linux:
runs-on: ubuntu-latest
Expand All @@ -57,19 +60,6 @@ jobs:
- name: Check out repository code
uses: actions/checkout@v4

# update our testing tag
- if: ${{ startsWith(github.ref, 'refs/heads/') }}
name: Update tag
uses: actions/github-script@v7
with:
script: |
github.rest.git.updateRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'tags/testing',
sha: context.sha
})
# install stuff and run tests
- run: sudo apt-get update -y
- run: sudo apt-get install -y python3-tk idle3 binutils
Expand All @@ -84,6 +74,19 @@ jobs:
run: echo "RELEASE_TAG=testing" >> $GITHUB_ENV
shell: bash

# update our testing tag
- if: ${{ startsWith(github.ref, 'refs/heads/') }}
name: Update tag
uses: actions/github-script@v7
with:
script: |
github.rest.git.updateRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'tags/testing',
sha: context.sha
})
# upload assets to release
- name: Upload Release Asset DXRando
id: upload-release-asset-dxrando
Expand All @@ -93,6 +96,7 @@ jobs:
file: installer/dist/DXRandoInstaller
asset_name: DXRandoInstaller-Linux
tag: ${{ env.RELEASE_TAG }}
overwrite: true

- name: Upload Release Asset BingoViewer
id: upload-release-asset-bingoviewer
Expand All @@ -102,3 +106,4 @@ jobs:
file: installer/dist/BingoViewer
asset_name: BingoViewer-Linux
tag: ${{ env.RELEASE_TAG }}
overwrite: true

0 comments on commit 52a8a63

Please sign in to comment.