Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging upstream #97

Merged
merged 210 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
210 commits
Select commit Hold shift + click to select a range
61454b6
- Improve performance of `FindReplacement` by maintaining a new field…
simplyWiri Dec 2, 2021
0e5dbc7
- Improve test cases around retrieving patch methods from patches.
simplyWiri Dec 2, 2021
ce0a477
Fix Unpatch(MethodBase, HarmonyPatchType, string) overload default
Windows10CE Mar 22, 2022
58b3acd
Merge pull request #465 from Windows10CE/master
pardeike Mar 23, 2022
f366a30
Update documentation [skip ci]
pardeike-bot Mar 23, 2022
2c4ddf0
SymbolExtensions.GetMethodInfo allow parameterless method decoding
mitchcapper Apr 22, 2022
f99da83
tests bug report #473
pardeike Apr 23, 2022
1f9aa13
excludes Core3 test for x86
pardeike Apr 23, 2022
41e8328
also core 3.1
pardeike Apr 23, 2022
2ed8f67
reverts changes
pardeike Apr 23, 2022
095487c
Merge pull request #472 from mitchcapper/getmethodinfo_parameterless_…
pardeike Apr 24, 2022
646c965
Update documentation [skip ci]
pardeike-bot Apr 24, 2022
d420fd5
refactors to latest language 10 features
pardeike Apr 24, 2022
9ddbd0b
Update documentation [skip ci]
pardeike-bot Apr 24, 2022
6f1f575
refactors to latest language 10 features
pardeike Apr 24, 2022
85f2f30
merge
pardeike Apr 24, 2022
4a82d0f
Update documentation [skip ci]
pardeike-bot Apr 24, 2022
93160f8
less supression
pardeike Apr 24, 2022
c7c4f77
updates dotnet url
pardeike Apr 28, 2022
9e5bd5a
adds LoadsConstant(this CodeInstruction code, string str)
pardeike May 3, 2022
2cec085
Update documentation [skip ci]
pardeike-bot May 3, 2022
99586ae
adds first draft of native method patching
pardeike May 5, 2022
56ac45a
Merge branch 'master' of https://github.com/pardeike/Harmony
pardeike May 5, 2022
4d8e540
- Add cache invalidation for methodStarts dictionary
simplyWiri Jan 8, 2022
6b07f0e
Docs - filter exception blocks are unsupported currently
Qkrisi Jun 16, 2022
81229d1
Filter block unsupported clarification
Qkrisi Jun 16, 2022
13b58f4
Merge pull request #485 from Qkrisi/master
pardeike Jun 16, 2022
932bd62
Update documentation [skip ci]
pardeike-bot Jun 16, 2022
dd08355
Merge pull request #437 from simplyWiri/master
pardeike Jun 30, 2022
e65a787
updates MMC to 22.6.3.1, removes marshalling tests due to crashing
pardeike Jun 30, 2022
bb0fa4f
fixes struct returning methods under non-windows
pardeike Jun 30, 2022
89a15f7
Update documentation [skip ci]
pardeike-bot Jun 30, 2022
dcbd265
adds net6 and net7
pardeike Jun 30, 2022
b86008b
disabled even more tests, re-enables parallel tests
pardeike Jul 1, 2022
6115e79
removes net7
pardeike Jul 1, 2022
cc40a5c
removes net7 for real
pardeike Jul 1, 2022
e28e864
uses sdk
pardeike Jul 19, 2022
df8d098
Merge pull request #489 from pardeike/net6-7
pardeike Jul 19, 2022
a5f0ad1
Update documentation [skip ci]
pardeike-bot Jul 19, 2022
d1aa13b
adds linux support for struct return buffer checks, adds lambda to Co…
pardeike Jul 19, 2022
5a48778
Update documentation [skip ci]
pardeike-bot Jul 19, 2022
2377372
Update issue templates
pardeike Jul 21, 2022
7a241fd
Add [HarmonyPatchCategory], PatchCategory, PatchAllUncategorized
rrazgriz Sep 6, 2022
30d5208
add patch class categories/functions to docs
rrazgriz Sep 6, 2022
7c46762
Update intro.html
pardeike Sep 26, 2022
beffadc
Methods for getting indices and making loads and stores
LoganDark Oct 3, 2022
b951db5
CodeMatch helpers for matching loads and stores
LoganDark Oct 3, 2022
679408e
Use the full "Argument" term in method names
LoganDark Oct 4, 2022
5f76f1c
Merge pull request #500 from LoganDark/local-index
pardeike Oct 4, 2022
3fe1b46
Update documentation [skip ci]
pardeike-bot Oct 4, 2022
0255bd1
Add an example for patch factory methods
Meigyoku-Thmn Oct 16, 2022
d0da150
Merge pull request #502 from Meigyoku-Thmn/patch-1
pardeike Oct 16, 2022
40e4820
Update documentation [skip ci]
pardeike-bot Oct 16, 2022
4000e08
adds static modifiers
pardeike Oct 16, 2022
e54dd81
Update documentation [skip ci]
pardeike-bot Oct 16, 2022
db80396
v2.3 implements boxing __instance correctly
pardeike Nov 2, 2022
75ca333
fixes #499 : argument array writing for non ref cases
pardeike Nov 2, 2022
61f4335
Merge pull request #498 from rrazgriz/categories
pardeike Nov 3, 2022
8be4600
Update documentation [skip ci]
pardeike-bot Nov 3, 2022
343a1e3
yet another injector
StackOverflowExcept1on Dec 22, 2022
9fcc73f
Merge pull request #512 from StackOverflowExcept1on/master
pardeike Dec 22, 2022
7541112
Update documentation [skip ci]
pardeike-bot Dec 22, 2022
2eef3d0
Update documentation [skip ci]
pardeike-bot Jan 8, 2023
e2296ce
Adds support for targeting an async method's internal state machine's…
Banane9 Mar 1, 2023
b329cbc
Adapts style and requests
Banane9 Mar 22, 2023
4e50067
Merge pull request #514 from Banane9/master
pardeike Mar 22, 2023
e0f9477
Update documentation [skip ci]
pardeike-bot Mar 22, 2023
d73cf84
Adds targeting indexer properties using Getter/Setter method types wi…
Banane9 Apr 3, 2023
57ba000
Merge branch 'master' of https://github.com/Banane9/Harmony
Banane9 Apr 3, 2023
e37d9ec
Add Delegate overloads and implicit casts to HarmonyMethod; Fixes #505
Banane9 Apr 3, 2023
fc19016
Merge pull request #519 from Banane9/master
pardeike Apr 3, 2023
933620d
Merge pull request #521 from Banane9/add-delegate-overload-505
pardeike Apr 3, 2023
cd26a43
fixes matching of code[operand] (#513)
pardeike Apr 3, 2023
4ff5696
bumb to v2.3
pardeike Apr 3, 2023
e44127d
butchered but compiling, several tests failing
pardeike Apr 4, 2023
f878def
improvements
pardeike Apr 4, 2023
b6ed2a2
updates ref assemblies to 1.0.3
pardeike Apr 4, 2023
b5d616d
uses net452 instead of net45 (no sdk avail)
pardeike Apr 4, 2023
708ce68
fixes all failing tests
pardeike Apr 4, 2023
9d21152
updates net45 to net452
pardeike Apr 4, 2023
0a0af58
adds net7 to test sdk matrix
pardeike Apr 4, 2023
50d3251
reverts ILRepack.Lib.MSBuild to 2.1.14
pardeike Apr 4, 2023
60405da
fixes failing tests
pardeike Apr 4, 2023
45efa8d
adds prerelease info for nuget
pardeike Apr 4, 2023
78f220b
adds debug output for azure debugging
pardeike Apr 4, 2023
1ed1ae4
alpha.2
pardeike Apr 4, 2023
e29a0a9
disables ilrepack as a test
pardeike Apr 4, 2023
85aa7d7
disables method-from-stackframe tests
pardeike Apr 4, 2023
6259310
removes debug output
pardeike Apr 4, 2023
1b5ff0f
disables more tests
pardeike Apr 4, 2023
f43955b
alpha.4
pardeike Apr 5, 2023
31aa9b6
Added netstandard2.0 reference assemblies support
Aragas Apr 7, 2023
4d9ae80
Replaced /lib to /ref for netstandard
Aragas Apr 7, 2023
be81a54
Removed System.Reflection.Emit.Lightweight
Aragas Apr 7, 2023
f810941
Merge pull request #523 from BUTR/netstandard_refasm
pardeike Apr 8, 2023
daeaa94
v2.3-alpha.5
pardeike Apr 8, 2023
24e2742
updates to prerelease.1
pardeike May 23, 2023
0e8d1c1
cleanup before 2.3 release
pardeike May 23, 2023
c5a526d
small fixes
pardeike May 25, 2023
f6b5daf
Prerelease 2 of Harmony v2.3
pardeike Jun 1, 2023
dd34cfe
Merge pull request #522 from pardeike/feature/monomod-core
pardeike Jun 1, 2023
7ab508c
fixes a bug where Harmony calls TargetMethods() always twice
pardeike Jun 7, 2023
6f91ae8
prerelease-3
pardeike Jun 11, 2023
41e9431
Update documentation [skip ci]
pardeike-bot Jun 12, 2023
b9206db
cleans up conditional compiles; tries to fix #533; refactors CodeMatc…
pardeike Jun 17, 2023
12fe301
Update documentation [skip ci]
pardeike-bot Jun 17, 2023
9c2efa5
Using `PlatformTriple.Current.GetIdentifiable` for a user submitted M…
Aragas Jun 28, 2023
d7396ca
Update documentation [skip ci]
pardeike-bot Jun 28, 2023
7f6a9ba
for fun revert back to MonoMod Core 1.0.0-prerelease.2
pardeike Jun 28, 2023
50c6209
Merge branch 'master' of https://github.com/pardeike/Harmony
pardeike Jun 28, 2023
16516e2
And back to MMC 1.0.0
pardeike Jun 28, 2023
5f82776
test: always add RET at end
pardeike Jul 2, 2023
b43eef8
new approach
pardeike Jul 2, 2023
eb79965
fixes unix tests (and a few bugs)
pardeike Jul 2, 2023
bcc3a09
patches Assembly.GetExecutingAssembly
pardeike Jul 10, 2023
68822de
more defensive
pardeike Jul 10, 2023
b680f92
simplifies handling of GetExecutingAssembly
pardeike Jul 12, 2023
3fdeb57
removes Test_PatchExceptionWithCleanup1
pardeike Jul 12, 2023
0b64f4c
GetExecutingAssembly Tuning and Tests (#537)
Aragas Jul 12, 2023
f05a536
housekeeping
pardeike Jul 12, 2023
feec730
removes more warnings
pardeike Jul 12, 2023
cda2226
Improves http_client tests
pardeike Jul 13, 2023
c2586e7
adds useful linux test shortcut
pardeike Jul 13, 2023
7e4183e
fixes CodeMatch(()=>...)
pardeike Jul 22, 2023
f7004f8
Update documentation [skip ci]
pardeike-bot Jul 22, 2023
4c9a3d1
Add null/zero return clarifcations for TargetMethod/s (#544)
SineSwiper Aug 27, 2023
5c42611
Update documentation [skip ci]
pardeike-bot Aug 27, 2023
7306263
Fix typo: auxilary -> auxiliary (#548)
ZXfkSIE Sep 15, 2023
77d37be
Update documentation [skip ci]
pardeike-bot Sep 15, 2023
18ce5f7
Documentation Auxiliary Methods - Attribute spelling issue. Plus logi…
erdelf Dec 4, 2023
c6e42d8
Update documentation [skip ci]
pardeike-bot Dec 4, 2023
7b26fbb
updates MonoMod.Core to latest prerelease
pardeike Dec 15, 2023
dbb0a86
Fix typo in intro.md
jivanf Dec 25, 2023
8444af2
Merge pull request #560 from jivanf/fix-docs-typo
pardeike Dec 26, 2023
d916a30
adds InnerTypes() and extensions for AccessTool methods on type Type
pardeike Dec 27, 2023
319307c
Update documentation [skip ci]
pardeike-bot Dec 27, 2023
606ba09
code cleanup, net8.0, optional ret code for methods ending in throw
pardeike Dec 29, 2023
b324216
Merge branch 'master' of https://github.com/pardeike/Harmony
pardeike Dec 29, 2023
4319b50
Update documentation [skip ci]
pardeike-bot Dec 29, 2023
1350ab8
v2.3-prerelease.4
pardeike Dec 29, 2023
e63e183
fixes a regression with methods ending in throw + ret
pardeike Jan 11, 2024
1b16c96
uses adapted versions of System.Text.Json for .NET 5-8 (#562)
pardeike Jan 11, 2024
1960f57
Support GenericInstance types in inline method signatures
Zetrith Jan 14, 2024
7b5158a
adds better detection for methods that end in dead code
pardeike Jan 22, 2024
1fcb42d
fixes test logic
pardeike Jan 22, 2024
7b4e5ef
Update documentation [skip ci]
pardeike-bot Jan 22, 2024
03b6426
Merge pull request #565 from Zetrith/master
pardeike Feb 2, 2024
1081de9
Ignore mono checksum bc it can fail in Azure somehow
pardeike Feb 2, 2024
89d4d9b
WIP: Fat/Lite Packages (#538)
Aragas Feb 2, 2024
04ba15b
Revert "WIP: Fat/Lite Packages (#538)"
pardeike Feb 2, 2024
6a1059b
Feature/fat version (#569)
pardeike Feb 3, 2024
072699c
Update bug_report.md
pardeike Feb 3, 2024
21f5091
removes debug logging
pardeike Feb 4, 2024
fc0537d
internalizes all dependency types
pardeike Feb 7, 2024
ff82ff4
Release v2.3
pardeike Feb 7, 2024
962e808
optimises PatchCategory(...)
pardeike Feb 12, 2024
2dec400
Update documentation [skip ci]
pardeike-bot Feb 12, 2024
c65ad05
filters out System. inherited types
pardeike Feb 12, 2024
f1c4421
Update documentation [skip ci]
pardeike-bot Feb 12, 2024
90520b8
code cleanup
pardeike Feb 12, 2024
3422ff5
Update documentation [skip ci]
pardeike-bot Feb 12, 2024
3869952
more cleanup & speed up PatchCategory(...)
pardeike Feb 12, 2024
fd02327
Update documentation [skip ci]
pardeike-bot Feb 12, 2024
5ce8bd9
Implemented a GitHub Actions testing pipeline (#575)
Aragas Feb 13, 2024
3ebbae3
small fixes
pardeike Feb 13, 2024
025b002
adds github test action badge
pardeike Feb 13, 2024
a862748
Fixed Mono not being tested (#577)
Aragas Feb 13, 2024
71b9836
renames test action
pardeike Feb 13, 2024
2ed05fa
cancel ongoing testing
pardeike Feb 13, 2024
d46b17b
better cancelling
pardeike Feb 13, 2024
f3d3122
Tests: Retry for MacOS (#579)
Aragas Feb 14, 2024
32e3f7b
Better mono setup on Windows (#578)
Aragas Feb 14, 2024
ca21a76
adds shortcuts for some API functions, cleans code and applies C#12 s…
pardeike Feb 19, 2024
2457353
Merge branch 'master' of https://github.com/pardeike/Harmony
pardeike Feb 19, 2024
be98a56
Update documentation [skip ci]
pardeike-bot Feb 19, 2024
2c2de77
updates summary
pardeike Feb 19, 2024
9615407
Update documentation [skip ci]
pardeike-bot Feb 19, 2024
16f00a1
reverts some [] syntax so it compiles in all .net versions
pardeike Feb 19, 2024
5f87799
Update documentation [skip ci]
pardeike-bot Feb 19, 2024
125a6d7
one more revert of [] syntax
pardeike Feb 19, 2024
2a09e7a
Tests: Added partial Rosetta 2 support (#580)
Aragas Feb 19, 2024
b2eb250
implements __resultRef (#582)
kohanis Feb 23, 2024
3c257bb
Update documentation [skip ci]
pardeike-bot Feb 23, 2024
a5677aa
fixes dependencies for thin version
pardeike Feb 26, 2024
37df904
mentions MonoMod.Core instead of MonoMod.Common, adds ref to nike4613
pardeike Feb 26, 2024
3a3a91d
Added SourceLink support (#587)
Aragas Mar 2, 2024
1dd31a8
Fix prefix skipping for dead-end code (#584)
kohanis Mar 2, 2024
c419782
excludes System.Reflection.Emit.* types, adds debug symbols
pardeike Mar 2, 2024
14eebba
Added pdb generation (#588)
Aragas Mar 2, 2024
caed8ec
v2.3.1
pardeike Mar 3, 2024
03a8be1
Added pdb generation 2 (#589)
Aragas Mar 3, 2024
45304b9
adds download counter
pardeike Mar 3, 2024
11b4245
adds latest release download link to download badge
pardeike Mar 3, 2024
2ccdfe6
Merge branch 'master' of https://github.com/pardeike/Harmony
pardeike Mar 3, 2024
a43ef19
Release 2.3.1
pardeike Mar 3, 2024
e8b8cb7
Moved ref/netstandard2.0 into Lib.Harmony.Ref (#591)
Aragas Mar 3, 2024
792585c
Fixed the unnecessary lib folder in Ref package (#593)
Aragas Mar 3, 2024
aa94c99
fixed netstandard problem
pardeike Mar 3, 2024
39d924d
Fixed Ref Package (#594)
Aragas Mar 3, 2024
0126028
Release v2.3.1.1
pardeike Mar 3, 2024
e29e6ff
Update documentation [skip ci]
pardeike-bot Mar 3, 2024
76b4879
restores newlines
pardeike Mar 3, 2024
712d70d
Merge remote-tracking tag 'harmony/v2.3.1.1'
kohanis May 30, 2024
22b8398
MonoMod.RuntimeDetour version bump
kohanis Mar 14, 2024
627bb6d
Changing stack trace fixes to il replacements
kohanis Mar 15, 2024
e7fe272
Implementing stack trace fixes tests
kohanis Mar 15, 2024
dc5b5ee
Fixing ManagedMethodPatcher.DetourTo return
kohanis Mar 15, 2024
173f2f6
Native detour patcher restructuring
kohanis Mar 15, 2024
c248ad1
Reverse patch hotfix
kohanis Mar 15, 2024
0794ba0
Adjusting workflows
kohanis Mar 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"cake.tool": {
"version": "2.0.0",
"version": "4.0.0",
"commands": [
"dotnet-cake"
]
Expand Down
78 changes: 75 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggesti
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion
csharp_style_expression_bodied_methods = false:suggestion
csharp_style_expression_bodied_constructors = false:suggestion
csharp_style_expression_bodied_operators = false:suggestion
csharp_style_expression_bodied_methods = when_on_single_line:suggestion
csharp_style_expression_bodied_constructors = when_on_single_line:suggestion
csharp_style_expression_bodied_operators = when_on_single_line:suggestion
csharp_style_expression_bodied_properties = true:suggestion
csharp_style_expression_bodied_indexers = true:suggestion
csharp_style_expression_bodied_accessors = true:suggestion
Expand Down Expand Up @@ -71,3 +71,75 @@ csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_preserve_single_line_statements = true
csharp_preserve_single_line_blocks = true
csharp_using_directive_placement = outside_namespace:silent
csharp_prefer_simple_using_statement = true:warning
csharp_style_namespace_declarations = block_scoped:silent
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_expression_bodied_lambdas = when_on_single_line:silent
csharp_style_expression_bodied_local_functions = when_on_single_line:silent
csharp_style_prefer_primary_constructors = true:suggestion

[*.{cs,vb}]
#### Naming styles ####

# Naming rules

dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i

dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case

dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case

# Symbol specifications

dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =

dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.required_modifiers =

dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =

# Naming styles

dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 3
indent_size = 3
dotnet_style_allow_statement_immediately_after_block_experimental = true:silent
53 changes: 37 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,53 @@
name: Build

on: [push, pull_request]
on:
push:
branches:
- "**"
pull_request:
workflow_dispatch:

env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1

jobs:
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-dotnet@v1
- name: Checkout
uses: actions/checkout@v4

- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
3.1.x
6.0.300
dotnet-version: |
3.x
5.x
6.x
7.x
8.x

- name: Log dotnet info
run: dotnet --info

- name: Run test
run: ./build.ps1 --target=Test

build:
runs-on: windows-latest
if: github.ref == 'refs/heads/master'
needs: test

steps:
- uses: actions/checkout@v1

- uses: actions/setup-dotnet@v1
- name: Checkout
uses: actions/checkout@v4

- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
3.1.x
6.0.300
dotnet-version: '8.x'

- name: Make repo pushable
env:
Expand All @@ -49,9 +68,11 @@ jobs:
- name: Get target file
id: getfilename
shell: bash
run: echo "::set-output name=file::$(ls ./Harmony/bin/Release/HarmonyX*.nupkg)"

- uses: actions/upload-artifact@v1
run: |
echo "file=$(ls ./Harmony/bin/Release/HarmonyX*.nupkg)" >> "$GITHUB_OUTPUT"

- name: Upload HarmonyX nupkg
uses: actions/upload-artifact@v4
with:
path: ${{ steps.getfilename.outputs.file }}
name: HarmonyX
path: ${{ steps.getfilename.outputs.file }}
47 changes: 24 additions & 23 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,47 @@ on:
tags:
- 'v*'

env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1

permissions:
contents: write

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v1
- uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1.x
6.0.300
- name: Checkout
uses: actions/checkout@v4

- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'

ManlyMarco marked this conversation as resolved.
Show resolved Hide resolved
- name: Get Version
id: get_version
shell: bash
run: |
tag=${GITHUB_REF##*/}
echo Current branch: ${tag:1}
echo ::set-output name=version_num::${tag:1}
echo "version_num=${tag:1}" >> "$GITHUB_OUTPUT"

- name: Run build script
run: ./build.ps1 --target=Build
shell: powershell

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
name: Release ${{ github.ref }}
body: ""
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Harmony/bin/Release/HarmonyX.${{ steps.get_version.outputs.version_num }}.nupkg
asset_name: HarmonyX.${{ steps.get_version.outputs.version_num }}.nupkg
asset_content_type: application/zip
token: ${{ secrets.GITHUB_TOKEN }}
files: |
./Harmony/bin/Release/HarmonyX.${{ steps.get_version.outputs.version_num }}.nupkg
Loading