-
Notifications
You must be signed in to change notification settings - Fork 2
157 lines (132 loc) · 5.97 KB
/
create_release.yml
File metadata and controls
157 lines (132 loc) · 5.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: Simutrans Tutorial
on:
push:
tags:
- 'Release'
workflow_dispatch:
jobs:
tutorial_pak64:
name: Simutrans Tutorial pak64
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
- name: load translate files
run: |
Invoke-WebRequest -Uri https://simutrans-germany.com/translator_page/scenarios/scenario_5/download.php
Invoke-WebRequest -Uri https://simutrans-germany.com/translator_page/scenarios/scenario_5/data/language_pack-Scenario+Tutorial+multipak.zip -OutFile language_pack.zip
- name: extract translate files
run: |
cd $Env:GITHUB_WORKSPACE
mkdir tutorial
mkdir tutorial\class
Expand-Archive language_pack.zip tutorial -Force
shell: pwsh
- name: copy files
run: |
cd $Env:GITHUB_WORKSPACE
copy class\*.* tutorial\class
copy *.nut tutorial
copy *.sve tutorial
shell: pwsh
- name: zip result
run: Compress-Archive tutorial tutorial_pak64.zip
shell: pwsh
- name: Update binaries of Nightly Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: tutorial_pak64.zip
asset_name: tutorial_pak64.zip
tag: Release
overwrite: true
tutorial_pak128:
name: Simutrans Tutorial pak128
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
- name: load translate files
run: |
Invoke-WebRequest -Uri https://simutrans-germany.com/translator_page/scenarios/scenario_5/download.php
Invoke-WebRequest -Uri https://simutrans-germany.com/translator_page/scenarios/scenario_5/data/language_pack-Scenario+Tutorial+multipak.zip -OutFile language_pack.zip
- name: extract translate files
run: |
cd $Env:GITHUB_WORKSPACE
mkdir tutorial
mkdir tutorial\class
Expand-Archive language_pack.zip tutorial -Force
shell: pwsh
- name: copy files
run: |
cd $Env:GITHUB_WORKSPACE
copy class\*.* tutorial\class
copy *.nut tutorial
copy *.sve tutorial
shell: pwsh
- name: set data
run: |
cd tutorial
(Get-Content -Path .\set_data.nut) | ForEach-Object {$_ -Replace ' pak_name <- "pak64"', '// pak_name <- "pak64"'} | Set-Content -Path .\set_data.nut
(Get-Content -Path .\set_data.nut) | ForEach-Object {$_ -Replace ' current_pak <- "pak"', '// current_pak <- "pak"'} | Set-Content -Path .\set_data.nut
(Get-Content -Path .\set_data.nut) | ForEach-Object {$_ -Replace ' map.file = "tutorial64.sve"', '// map.file = "tutorial64.sve"'} | Set-Content -Path .\set_data.nut
(Get-Content -Path .\set_data.nut) | ForEach-Object {$_ -Replace '// pak_name <- "pak128"', ' pak_name <- "pak128"'} | Set-Content -Path .\set_data.nut
(Get-Content -Path .\set_data.nut) | ForEach-Object {$_ -Replace '// current_pak <- "pak128"', ' current_pak <- "pak128"'} | Set-Content -Path .\set_data.nut
(Get-Content -Path .\set_data.nut) | ForEach-Object {$_ -Replace '// map.file = "tutorial128.sve"', ' map.file = "tutorial128.sve"'} | Set-Content -Path .\set_data.nut
shell: pwsh
- name: zip result
run: Compress-Archive tutorial tutorial_pak128.zip
shell: pwsh
- name: Update binaries of Nightly Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: tutorial_pak128.zip
asset_name: tutorial_pak128.zip
tag: Release
overwrite: true
tutorial_pak64german:
name: Simutrans Tutorial pak64.german
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
- name: load translate files
run: |
Invoke-WebRequest -Uri https://simutrans-germany.com/translator_page/scenarios/scenario_5/download.php
Invoke-WebRequest -Uri https://simutrans-germany.com/translator_page/scenarios/scenario_5/data/language_pack-Scenario+Tutorial+multipak.zip -OutFile language_pack.zip
- name: extract translate files
run: |
cd $Env:GITHUB_WORKSPACE
mkdir tutorial
mkdir tutorial\class
Expand-Archive language_pack.zip tutorial -Force
shell: pwsh
- name: copy files
run: |
cd $Env:GITHUB_WORKSPACE
copy class\*.* tutorial\class
copy *.nut tutorial
copy *.sve tutorial
shell: pwsh
- name: set data
run: |
cd tutorial
(Get-Content -Path .\set_data.nut) | ForEach-Object {$_ -Replace ' pak_name <- "pak64"', '// pak_name <- "pak64"'} | Set-Content -Path .\set_data.nut
(Get-Content -Path .\set_data.nut) | ForEach-Object {$_ -Replace ' current_pak <- "pak"', '// current_pak <- "pak"'} | Set-Content -Path .\set_data.nut
(Get-Content -Path .\set_data.nut) | ForEach-Object {$_ -Replace ' map.file = "tutorial64.sve"', '// map.file = "tutorial64.sve"'} | Set-Content -Path .\set_data.nut
(Get-Content -Path .\set_data.nut) | ForEach-Object {$_ -Replace '// pak_name <- "pak64.german"', ' pak_name <- "pak64.german"'} | Set-Content -Path .\set_data.nut
(Get-Content -Path .\set_data.nut) | ForEach-Object {$_ -Replace '// current_pak <- "pak64.german"', ' current_pak <- "pak64german"'} | Set-Content -Path .\set_data.nut
(Get-Content -Path .\set_data.nut) | ForEach-Object {$_ -Replace '// map.file = "tutorial64g.sve"', ' map.file = "tutorial64g.sve"'} | Set-Content -Path .\set_data.nut
shell: pwsh
- name: zip result
run: Compress-Archive tutorial tutorial_pak64german.zip
shell: pwsh
- name: Update binaries of Nightly Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: tutorial_pak64german.zip
asset_name: tutorial_pak64german.zip
tag: Release
overwrite: true