-
Notifications
You must be signed in to change notification settings - Fork 0
123 lines (104 loc) · 4.97 KB
/
main.yml
File metadata and controls
123 lines (104 loc) · 4.97 KB
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Build TOP2000 for MS-DOS
on: [push,workflow_dispatch]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: windows-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4.0.0
- name: Download TOP2000 database
run: |
cd SRC\DOWNLOAD
dotnet run .\DownloaderApp.csproj
- name: Install dosbox
run: choco install dosbox
- name: Compile CRTINDEX.EXE
run: |
cd "C:\Program Files (x86)\DOSBox-0.74-3"
$Env:SDL_VIDEODRIVER = 'dummy'
.\DOSBox.exe -c "mount C ${{github.workspace}}" -c "C:" -c "cd SRC\CRTINDEX" -c "build.bat" -c "EXIT" -noconsole -noautoexec | Out-Null
type ${{github.workspace}}\SRC\CRTINDEX\OBJ\OUTPUT.TXT
- name: Compile TOP2000.EXE
run: |
cd "C:\Program Files (x86)\DOSBox-0.74-3"
$Env:SDL_VIDEODRIVER = 'dummy'
.\DOSBox.exe -c "mount C ${{ github.workspace }}" -c "C:" -c "cd SRC\TOP2000" -c "build.bat" -c "EXIT" -noconsole -noautoexec | Out-Null
type ${{github.workspace}}\SRC\TOP2000\OBJ\OUTPUT.TXT
- name: Create TOP2000.DAT
run: |
cd "C:\Program Files (x86)\DOSBox-0.74-3"
$Env:SDL_VIDEODRIVER = 'dummy'
.\DOSBox.exe -c "mount C ${{ github.workspace }}" -c "C:" -c "cd SRC\DB" -c "build.bat" -c "EXIT" -noconsole -noautoexec | Out-Null
type ${{github.workspace}}\SRC\DB\OUTPUT.TXT
- name: Create TOP2000 DOS Site
run: |
cd "SRC\WEB"
.\build.ps1
- name: Create js-dos artifact
run: |
cd ${{ github.workspace }}\Publish\jsdos
copy ${{ github.workspace }}\SRC\TOP2000\BIN\TOP2000.EXE TOP2000.EXE
copy ${{ github.workspace }}\SRC\DB\BIN\TOP2000.DAT TOP2000.DAT
- name: Create App artifact
run: |
cd ${{ github.workspace }}\Publish\App
copy "C:\Program Files (x86)\DOSBox-0.74-3\DOSBox.exe" DOSBox.exe
copy "C:\Program Files (x86)\DOSBox-0.74-3\SDL_net.dll" SDL_net.dll
copy "C:\Program Files (x86)\DOSBox-0.74-3\SDL.dll" SDL.dll
copy ${{ github.workspace }}\SRC\TOP2000\BIN\TOP2000.EXE TOP2000.EXE
copy ${{ github.workspace }}\SRC\DB\BIN\TOP2000.DAT TOP2000.DAT
- name: Compress
run: |
cd "C:\Program Files (x86)\DOSBox-0.74-3"
$Env:SDL_VIDEODRIVER = 'dummy'
.\DOSBox.exe -c "mount C ${{ github.workspace }}" -c "C:" -c "C:\VBDOS\COMPRESS.EXE -r C:\SRC\TOP2000\BIN\TOP2000.EXE C:\PUBLISH\DISK > OUTPUT.TXT" -c "EXIT" -noconsole -noautoexec | Out-Null
type ${{github.workspace}}\OUTPUT.TXT
.\DOSBox.exe -c "mount C ${{ github.workspace }}" -c "C:" -c "C:\VBDOS\COMPRESS.EXE -r C:\SRC\TOP2000\TOP2000.ICO C:\PUBLISH\DISK > OUTPUT.TXT" -c "EXIT" -noconsole -noautoexec | Out-Null
type ${{github.workspace}}\OUTPUT.TXT
.\DOSBox.exe -c "mount C ${{ github.workspace }}" -c "C:" -c "C:\VBDOS\COMPRESS.EXE -r C:\SRC\DB\BIN\TOP2000.DAT C:\PUBLISH\DISK > OUTPUT.TXT" -c "EXIT" -noconsole -noautoexec | Out-Null
type ${{github.workspace}}\OUTPUT.TXT
- name: Create Raw artifact
run: |
cd ${{ github.workspace }}\Publish\
mkdir RAW
cd RAW
copy ${{ github.workspace }}\SRC\TOP2000\BIN\TOP2000.EXE TOP2000.EXE
copy ${{ github.workspace }}\SRC\TOP2000\TOP2000.ICO TOP2000.ICO
copy ${{ github.workspace }}\SRC\DB\BIN\TOP2000.DAT TOP2000.DAT
- name: Compress artifacts for site deploy
run: |
mkdir ${{github.workspace}}\SRC\WEB\BIN\releases
Compress-Archive -Path ${{github.workspace}}\Publish\APP\* -DestinationPath ${{github.workspace}}\SRC\WEB\BIN\releases\top2000-dosbox.zip
Compress-Archive -Path ${{github.workspace}}\Publish\DISK\* -DestinationPath ${{github.workspace}}\SRC\WEB\BIN\releases\top2000-disk.zip
Compress-Archive -Path ${{github.workspace}}\Publish\RAW\* -DestinationPath ${{github.workspace}}\SRC\WEB\BIN\releases\top2000.zip
Compress-Archive -Path ${{github.workspace}}\Publish\jsdos\* -DestinationPath ${{github.workspace}}\SRC\WEB\BIN\top2000.jsdos
- name: copy site
run: |
mkdir ${{github.workspace}}\_site
xcopy ${{github.workspace}}\SRC\WEB\BIN\*.* ${{ github.workspace }}\_site\ /S
- name: Publish App disk artifact
uses: actions/upload-artifact@v3
with:
name: Code
path: Publish
- name: Archive TOP2000 DOS Site
uses: actions/upload-pages-artifact@v1
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1