Skip to content

Update dalamud and net8 #55

Update dalamud and net8

Update dalamud and net8 #55

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
runs-on: windows-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Setup Nuget
uses: nuget/setup-nuget@v1
with:
nuget-version: latest
- name: Restore Nuget Packages
run: nuget restore SkipCutscene.sln
- name: Build
run: |
dotnet build $Env:GITHUB_WORKSPACE\SkipCutscene.sln /p:Configuration=Release /p:DefineConstants=XL_NOAUTOUPDATE
# - name: Protect
# run: |
# cd "$Env:GITHUB_WORKSPACE"
# .\Lib\.NET_Reactor\dotNET_Reactor.Console.exe -file ".\SkipCutscene\bin\Release\net8.0-windows\SkipCutscene.dll" -antitamp 1 -hide_calls 1 -control_flow_obfuscation 1 -flow_level 9 -resourceencryption 1 -exclusion_rules "^Plugins\.a08381\.SkipCutscene::types:^Config$"
# Move-Item -Path .\SkipCutscene\bin\Release\net8.0-windows\SkipCutscene_Secure\* -Destination .\SkipCutscene\bin\Release\net8.0-windows -Force
# Remove-Item -Path .\SkipCutscene\bin\Release\net8.0-windows\SkipCutscene_Secure -Force -Recurse -ErrorAction:Continue
- name: Remove Useless
run: |
cd "$Env:GITHUB_WORKSPACE"
Remove-Item -Path .\SkipCutscene\bin\Release\net8.0-windows\SkipCutscene -Force -Recurse -ErrorAction:Continue
Remove-Item -Path .\SkipCutscene\bin\Release\net8.0-windows\SkipCutscene.deps.json -Force -Recurse -ErrorAction:Continue
Remove-Item -Path .\SkipCutscene\bin\Release\net8.0-windows\ref -Force -Recurse -ErrorAction:Continue
mkdir -Path .\SkipCutscene\bin\Package\
- name: Package
uses: vimtor/action-zip@v1
with:
files: SkipCutscene\bin\Release\net8.0-windows\SkipCutscene.dll SkipCutscene\bin\Release\net8.0-windows\SkipCutscene.json SkipCutscene\bin\Release\net8.0-windows\SkipCutscene.pdb
dest: SkipCutscene\bin\Package\latest.zip
- name: Package
run: |
cd "$Env:GITHUB_WORKSPACE"
Copy-Item -Path .\SkipCutscene\bin\Release\net8.0-windows\SkipCutscene.json -Destination .\SkipCutscene\bin\Package\
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: SkipCutscene
path: ${{ github.workspace }}\SkipCutscene\bin\Release\net8.0-windows
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: Package
path: ${{ github.workspace }}\SkipCutscene\bin\Package\
- name: Checkout dist
uses: actions/checkout@v2
with:
ref: dist
path: dist
- name: Upload dist
continue-on-error: false
run: |
cd "$Env:GITHUB_WORKSPACE"
$content = Get-Content ".\dist\repo.json"
$repo = $content | ConvertFrom-Json
$version = '"AssemblyVersion": "9.9.9.9"'
$plugin = Get-Content ".\SkipCutscene\bin\Package\SkipCutscene.json" | ConvertFrom-Json
$old_version = $version -replace '9.9.9.9',$repo.AssemblyVersion
$new_version = $version -replace '9.9.9.9',$plugin.AssemblyVersion
$content = $content -replace $old_version,$new_version
$api_level = '"DalamudApiLevel": 9999'
$old_api_level = $api_level -replace '9999',$repo.DalamudApiLevel
$new_api_level = $api_level -replace '9999',$plugin.DalamudApiLevel
$content = $content -replace $old_api_level,$new_api_level
Set-Content -Path ".\dist\repo.json" -Value $content
Copy-Item -Path .\SkipCutscene\bin\Package\latest.zip -Destination .\dist\ -Force
cd dist
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Regenerate PluginMaster"
- name: Push dist
continue-on-error: false
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: dist
directory: dist