Skip to content

Commit 984b465

Browse files
authored
Fix no private access CI/CD builds and some more stuff (#32)
* Fix no private access CI/CD builds * Missed array brackets * how can I have an error on a COMMENT line * Adjust YRpp repo path to point to mainline one in attempt to fix compilation * Add github.com hostkey to known hosts * Also create the folder too github y u do dis * apparently I lack `touch` experience * Attempting to salvage the situation by using an unmerged version of checkout action * Switch to fixed custom checkout action * Adjust necessary files in artifacts * fix copy command * nevermind
1 parent c8606f3 commit 984b465

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

.github/actions/build/action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,12 @@ runs:
3030
run: msbuild /m /p:Configuration=${{inputs.build-config}} /p:GitCommit=${{github.sha}} /p:GitBranch=${{github.ref}} /v:q ${{inputs.sln-path}}
3131
shell: cmd
3232

33-
- name: Upload Artifact
33+
- name: Upload artifact
3434
if: ${{ success() && inputs.artifact-name != '' }}
3535
uses: actions/upload-artifact@v4
3636
with:
3737
name: ${{ inputs.artifact-name }}
3838
path: |
39+
${{inputs.sln-path}}/LICENSE.md
3940
${{inputs.sln-path}}/${{inputs.build-config}}/CnCNet-Spawner.dll
40-
${{inputs.sln-path}}/${{inputs.build-config}}/CnCNet-Spawner.pdb
41+
${{!contains(inputs.build-config, 'Hardened') && format('{0}/{1}/CnCNet-Spawner.pdb', inputs.sln-path, inputs.build-config)}}

.github/workflows/nightly-build.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,21 @@ jobs:
1717
build-type: [DevBuild] # [Debug, DevBuild, Release]
1818
is-cncnet-yr: ['', -CnCNetYR]
1919
is-hardened: ['', -Hardened]
20+
# this dimension is only needed to check whether we're in CnCNet repo
21+
# and exclude hardened build because we may have no access to it
22+
has-private-access:
23+
- ${{ github.repository_owner == 'CnCNet' }}
24+
exclude:
25+
- is-hardened: -Hardened
26+
has-private-access: false
2027

2128
steps:
22-
- uses: actions/checkout@v4
29+
- uses: Metadorius/checkout@d1a22c1aff33852a0154ff5262e4eab45178154c # fixed SpecificSubmodule branch
2330
with:
24-
submodules: recursive
2531
ssh-key: ${{ secrets.CNCNET_CI_SSH_PRIVATEKEY }}
32+
submodule-directories: |
33+
YRpp
34+
${{ matrix.has-private-access && 'Private' }}
2635
2736
- name: Build
2837
uses: ./.github/actions/build

.github/workflows/release-build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ jobs:
3030
build-config: ${{ env.BUILD_CONFIG }}
3131

3232
- name: Create an Archive for the Release
33-
run: 7z a ${{ env.ARCHIVE_NAME }}.zip ./LICENSE.md ./${{ env.BUILD_CONFIG }}/CnCNet-Spawner.dll ./${{ env.BUILD_CONFIG }}/CnCNet-Spawner.pdb
33+
run: >
34+
7z a ${{ env.ARCHIVE_NAME }}.zip
35+
./LICENSE.md
36+
./${{ env.BUILD_CONFIG }}/CnCNet-Spawner.dll
37+
${{!contains(env.BUILD_CONFIG, 'Hardened') && format('./{0}/CnCNet-Spawner.pdb', env.BUILD_CONFIG)}}
3438
3539
- name: Upload Files to the Release
3640
uses: softprops/action-gh-release@v2

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[submodule "YRpp"]
22
path = YRpp
3-
url = [email protected]:CnCNet/YRpp.git
3+
url = [email protected]:Phobos-developers/YRpp.git
44
[submodule "Private"]
55
path = Private
66
url = [email protected]:CnCNet/yrpp-spawner-private.git

0 commit comments

Comments
 (0)