Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
urothis committed Dec 30, 2023
1 parent 8e6d97e commit 87e3ccc
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 8 deletions.
12 changes: 7 additions & 5 deletions .actions/nwserver/download/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,17 @@ runs:
shell: bash
env:
APP_ID: 704450
BUILD_ID: 11253735
WIN_BIN_DEPOT_ID: 704452
LINUX_BIN_DEPOT_ID: 704454
CONTENT_DEPOT_ID: 704451
NWN_ROOT: ./
run: |
mkdir -p ${{ inputs.output_path }}/nwserver/lang/en/data ${{ inputs.output_path }}/nwserver/data/bin/linux-amd64 ${{ inputs.output_path }}/nwserver/data/bin/linux-arm64 ${{ inputs.output_path }}/nwserver/data/data/mod/
cd DepotDownloader/DepotDownloader
dotnet run -app 704450 -depot 704452 -username ${{ inputs.steam_username }} -password ${{ inputs.steam_password }}
dotnet run -app 704450 -depot 704454 -username ${{ inputs.steam_username }} -password ${{ inputs.steam_password }}
dotnet run -app 704450 -depot 704451 -username ${{ inputs.steam_username }} -password ${{ inputs.steam_password }}
ls -la depots/704451/
dotnet run -app 704450 -depot ${{ inputs.WIN_BIN_DEPOT_ID }} -username ${{ inputs.steam_username }} -password ${{ inputs.steam_password }}
dotnet run -app 704450 -depot ${{ inputs.LINUX_BIN_DEPOT_ID }} -username ${{ inputs.steam_username }} -password ${{ inputs.steam_password }}
dotnet run -app 704450 -depot ${{ inputs.CONTENT_DEPOT_ID }} -username ${{ inputs.steam_username }} -password ${{ inputs.steam_password }}
cd depots/${{ inputs.CONTENT_DEPOT_ID }}/*/
cp bin/linux-x86/nwserver-linux ${{ inputs.output_path }}/nwserver/docker_data/data/bin/linux-amd64/nwserver
cp bin/win32/nwserver.exe ${{ inputs.output_path }}/nwserver.exe
cp bin/linux-arm64/nwserver-linux ${{ inputs.output_path }}/nwserver/docker_data/data/bin/linux-arm64/nwserver
1 change: 0 additions & 1 deletion .actions/nwserver/package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ runs:
shell: bash
env:
APP_ID: 704450
BUILD_ID: 11253735
WIN_BIN_DEPOT_ID: 704452
LINUX_BIN_DEPOT_ID: 704454
CONTENT_DEPOT_ID: 704451
Expand Down
29 changes: 29 additions & 0 deletions .actions/nwserver/parse/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Parse nwserver"
inputs:
path:
description: "Path to nwserver.exe"
required: true
type: string
default: "nwserver/nwserver.exe"
outputs:
version: ${{ steps.nwn.outputs.version }}
major: ${{ steps.nwn.outputs.major }}
minor: ${{ steps.nwn.outputs.minor }}
patch: ${{ steps.nwn.outputs.patch }}
runs:
using: "composite"
steps:
- name: Install Dependencies
shell: bash
run: |
sudo apt install unzip pev
wget -O /usr/local/bin/semver https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver
chmod +x /usr/local/bin/semver
- name: Parse nwnee files
id: nwn
shell: bash
run: |
echo version=$(peres -v nwserver.exe -f csv | grep -v DEBUG | cut -d'.' -f2- | sed -n 2p) >> $GITHUB_OUTPUT
echo major=$(semver get major $(peres -v nwserver.exe -f csv | grep -v DEBUG | cut -d'.' -f2- | sed -n 2p)) >> $GITHUB_OUTPUT
echo minor=$(semver get minor $(peres -v nwserver.exe -f csv | grep -v DEBUG | cut -d'.' -f2- | sed -n 2p)) >> $GITHUB_OUTPUT
echo patch=$(semver get patch $(peres -v nwserver.exe -f csv | grep -v DEBUG | cut -d'.' -f2- | sed -n 2p)) >> $GITHUB_OUTPUT
16 changes: 14 additions & 2 deletions .github/workflows/nwserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,23 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Download nwnee
id: download
uses: ./.actions/nwserver/download/
with:
preview: ${{ matrix.channel == 'preview' }}
steam_username: ${{ secrets.STEAM_USER }}
steam_password: ${{ secrets.STEAM_PASS }}
output_path: ${{ github.workspace }}


- name: Parse nwnxee
id: parse
uses: ./.actions/nwserver/parse/
with:
input_path: ${{ github.workspace }}/nwserver
output_path: ${{ github.workspace }}/nwserver
channel: ${{ matrix.channel }}
- name: Echo outputs
run: |
echo "version: ${{ steps.parse.outputs.version }}"
echo "major: ${{ steps.parse.outputs.major }}"
echo "minor: ${{ steps.parse.outputs.minor }}"
echo "patch: ${{ steps.parse.outputs.patch }}"

0 comments on commit 87e3ccc

Please sign in to comment.