Skip to content

Commit 9ed7a72

Browse files
authored
Merge pull request #36 from schlosrat/Dev
Dev
2 parents 7f64e8b + 29718e4 commit 9ed7a72

417 files changed

Lines changed: 12658 additions & 10569 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
with:
14+
lfs: true
15+
16+
- name: Build the solution
17+
run: dotnet build "FlightPlan.sln" -c Release
18+
19+
- name: Find zip
20+
id: find-zip
21+
run: |
22+
echo "zip=$(ls -1 dist/flight_plan-*.zip | head -n 1)" >> $GITHUB_ENV
23+
echo "artifact_name=FlightPlanRelease" >> $GITHUB_ENV
24+
25+
- name: Upload zip artifact
26+
uses: actions/upload-artifact@v3
27+
with:
28+
name: ${{ env.artifact_name }}
29+
path: ${{ env.zip }}

.github/workflows/release.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Upload release
2+
3+
env:
4+
SPACEDOCK_MOD_ID: fill_in_your_mod_id_here
5+
6+
on:
7+
release:
8+
types: [ "published" ]
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
permissions: write-all
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
with:
18+
lfs: true
19+
20+
- name: Download NuGet
21+
id: download-nuget
22+
run: sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
23+
24+
- name: Install jq
25+
uses: dcarbone/[email protected]
26+
27+
- name: Build the solution
28+
run: dotnet build "FlightPlan.sln" -c Release
29+
30+
- name: Extract current version
31+
id: get-version
32+
run: |
33+
version=$(jq -r '.version' plugin_template/swinfo.json)
34+
echo "Version is $version"
35+
echo "version=$version" >> $GITHUB_ENV
36+
echo "release_filename=flight_plan-$version.zip" >> $GITHUB_ENV
37+
echo "zip=$(ls -1 dist/flight_plan-*.zip | head -n 1)" >> $GITHUB_ENV
38+
echo "upload_url=$(wget -qO- https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq '.[0].upload_url' | tr -d \")" >> $GITHUB_ENV
39+
wget -qO- https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq -r '.[0].body' > ./changelog.md
40+
41+
- name: Upload zip to release
42+
uses: shogo82148/[email protected]
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
with:
46+
upload_url: ${{ env.upload_url }}
47+
asset_path: ${{ env.zip }}
48+
asset_name: ${{ env.release_filename }}
49+
asset_content_type: application/zip
50+
51+
# - name: Add Mask
52+
# run: echo "::add-mask::${{ secrets.SPACEDOCK_PASSWORD }}"
53+
#
54+
# - name: Update mod on SpaceDock
55+
# uses: KSP2Community/[email protected]
56+
# with:
57+
# username: ${{ secrets.SPACEDOCK_USER }}
58+
# password: ${{ secrets.SPACEDOCK_PASSWORD }}
59+
# game_id: 22407
60+
# mod_id: ${{ env.SPACEDOCK_MOD_ID }}
61+
# version: ${{ env.version }}
62+
# zipball: ${{ env.zip }}
63+
# changelog: ./changelog.md

.github/workflows/verify.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Verify swinfo.json
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
verify:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout Repository
13+
uses: actions/checkout@v4
14+
15+
- name: Verify KSP2 Mod
16+
uses: Rexicon226/[email protected]

0 commit comments

Comments
 (0)