Skip to content

Commit

Permalink
Merge pull request #322 from amazingalek/dev
Browse files Browse the repository at this point in the history
v1: IoC, tests, new release pipeline, lots of cleanup/refactoring (#319)
  • Loading branch information
amazingalek authored Dec 18, 2020
2 parents f405251 + f7f0aa9 commit 0dbea45
Show file tree
Hide file tree
Showing 469 changed files with 12,639 additions and 10,022 deletions.
116 changes: 116 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:

jobs:

build:
runs-on: windows-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
INTERNAL_PKG_KEY: ${{ secrets.INTERNAL_PKG_KEY }}
steps:
- uses: actions/checkout@v2

- name: get version
id: version
uses: notiz-dev/github-action-json-property@release
with:
path: src\OWML.Launcher\OWML.Manifest.json
prop_path: version
- name: set version - EnableDebugMode
uses: jossef/action-set-json-field@v1
with:
file: src\SampleMods\OWML.EnableDebugMode\manifest.json
field: version
value: ${{ steps.version.outputs.prop }}
- name: set version - LoadCustomAssets
uses: jossef/action-set-json-field@v1
with:
file: src\SampleMods\OWML.LoadCustomAssets\manifest.json
field: version
value: ${{ steps.version.outputs.prop }}
- name: set assembly version
uses: rshillington/file-content-replacer@master
with:
files: "**/AssemblyInfo.cs"
from: '\[assembly: AssemblyVersion\("[0-9.]*"\)\]'
to: '[assembly: AssemblyVersion("${{ steps.version.outputs.prop }}")]'

- name: setup msbuild
uses: microsoft/setup-msbuild@v1
- name: setup nuget
uses: NuGet/[email protected]
- name: restore
run: nuget restore OWML.sln
- name: build
run: msbuild OWML.sln

- name: pack
run: nuget pack src\OWML.ModHelper\OWML.ModHelper.csproj
- name: upload nuget
uses: actions/upload-artifact@v2
with:
name: owml-nuget
path: OWML.*.nupkg

- name: create zip
run: |
cd src\OWML.Launcher\bin\Debug
mkdir Logs
mkdir Mods
7z a OWML.zip *
- name: upload zip
uses: actions/upload-artifact@v2
with:
name: owml-zip
path: src\OWML.Launcher\bin\Debug\OWML.zip

nuget:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- name: download artifact
uses: actions/download-artifact@v2
with:
name: owml-nuget
- name: publish
uses: myci-actions/publish-nuget@2 # todo untested
with:
filename: OWML.*.nupkg
api-key: ${{ secrets.NUGET_KEY }}

release:
runs-on: ubuntu-latest
needs: nuget
if: github.ref == 'refs/heads/master'
steps:
- name: download artifact
uses: actions/download-artifact@v2
with:
name: owml-zip
- name: create release # todo untested
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version.outputs.prop }}
release_name: ${{ steps.version.outputs.prop }}
draft: true # todo
prerelease: true # todo
- name: upload zip to release # todo untested
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./OWML.zip
asset_name: OWML.zip
asset_content_type: application/zip
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ StyleCopReport.xml
*.ilk
*.meta
*.obj
!duck.obj
*.iobj
*.pch
*.pdb
Expand Down
15 changes: 0 additions & 15 deletions OWML.Common/Constants.cs

This file was deleted.

16 changes: 0 additions & 16 deletions OWML.Common/Events.cs

This file was deleted.

20 changes: 0 additions & 20 deletions OWML.Common/IHarmonyHelper.cs

This file was deleted.

14 changes: 0 additions & 14 deletions OWML.Common/IModAsset.cs

This file was deleted.

13 changes: 0 additions & 13 deletions OWML.Common/IModAssets.cs

This file was deleted.

14 changes: 0 additions & 14 deletions OWML.Common/IModBehaviour.cs

This file was deleted.

16 changes: 0 additions & 16 deletions OWML.Common/IModConfig.cs

This file was deleted.

13 changes: 0 additions & 13 deletions OWML.Common/IModConsole.cs

This file was deleted.

16 changes: 0 additions & 16 deletions OWML.Common/IModData.cs

This file was deleted.

19 changes: 0 additions & 19 deletions OWML.Common/IModEvents.cs

This file was deleted.

9 changes: 0 additions & 9 deletions OWML.Common/IModFinder.cs

This file was deleted.

20 changes: 0 additions & 20 deletions OWML.Common/IModHelper.cs

This file was deleted.

19 changes: 0 additions & 19 deletions OWML.Common/IModInputCombination.cs

This file was deleted.

21 changes: 0 additions & 21 deletions OWML.Common/IModInputHandler.cs

This file was deleted.

10 changes: 0 additions & 10 deletions OWML.Common/IModInputTextures.cs

This file was deleted.

14 changes: 0 additions & 14 deletions OWML.Common/IModInteraction.cs

This file was deleted.

8 changes: 0 additions & 8 deletions OWML.Common/IModLogger.cs

This file was deleted.

Loading

0 comments on commit 0dbea45

Please sign in to comment.