-
Notifications
You must be signed in to change notification settings - Fork 12
103 lines (90 loc) · 2.98 KB
/
release-installer.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: release-installer
on:
release:
types:
- published
- prereleased
push:
branches: ["master"]
jobs:
windows:
runs-on: windows-latest
env:
RELEASE_TAG: testing
steps:
- name: Check out repository code
uses: actions/checkout@v4
# install stuff and run tests
- uses: ./.github/run-tests
# set the tag to the current ref, otherwise stick with the testing tag
- if: ${{ ! startsWith(github.ref, 'refs/heads/') }}
run: echo "RELEASE_TAG=${{ github.ref }}" >> $GITHUB_ENV
shell: bash
# upload assets to release
- name: Upload Release Asset DXRando
id: upload-release-asset-dxrando
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
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
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: installer/dist/BingoViewer.exe
asset_name: BingoViewer.exe
tag: ${{ env.RELEASE_TAG }}
overwrite: true
linux:
runs-on: ubuntu-latest
env:
RELEASE_TAG: testing
defaults:
run:
shell: bash
steps:
- name: Check out repository code
uses: actions/checkout@v4
# install stuff and run tests
- run: sudo apt-get update -y
- run: sudo apt-get install -y python3-tk idle3 binutils
- uses: ./.github/run-tests
# set the tag to the current ref, otherwise stick with the testing tag
- if: ${{ ! startsWith(github.ref, 'refs/heads/') }}
run: echo "RELEASE_TAG=${{ github.ref }}" >> $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
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: installer/dist/DXRandoInstaller
asset_name: DXRandoInstaller-Linux
tag: ${{ env.RELEASE_TAG }}
overwrite: true
- name: Upload Release Asset BingoViewer
id: upload-release-asset-bingoviewer
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: installer/dist/BingoViewer
asset_name: BingoViewer-Linux
tag: ${{ env.RELEASE_TAG }}
overwrite: true