bump version to 2.6.2.2 #104
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: IINACT build | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
RELEASE_VERSION: '0.0.0.0' | |
DALAMUD_HOME: /tmp/dalamud | |
DOTNET_NOLOGO: true | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: Download Dalamud | |
shell: pwsh | |
run: | | |
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -OutFile latest.zip | |
Expand-Archive -Force latest.zip /tmp/dalamud | |
- name: Build | |
run: dotnet build -c release | |
- name: Prepare Build Artifact | |
shell: pwsh | |
run: | | |
Copy-Item "IINACT/bin/Release/win-x64/IINACT/latest.zip" -Destination "IINACT.zip" | |
Expand-Archive -Force IINACT.zip Artifact | |
- name: Upload IINACT | |
uses: actions/upload-artifact@v3 | |
with: | |
name: IINACT | |
path: Artifact/* | |
- name: Update repo.json if needed | |
shell: pwsh | |
run: | | |
$repo = Get-Content 'repo.json' -raw | ConvertFrom-Json | |
$build = Get-Content 'IINACT/bin/Release/win-x64/IINACT/IINACT.json' -raw | ConvertFrom-Json | |
if ($repo.AssemblyVersion -eq $build.AssemblyVersion) { | |
Exit | |
} | |
Write-Output "RELEASE_VERSION=$($build.AssemblyVersion)" >> $env:GITHUB_ENV | |
$repo.AssemblyVersion = $repo.TestingAssemblyVersion = $build.AssemblyVersion | |
$repo.DownloadLinkInstall = 'https://github.com/marzent/IINACT/releases/download/v' + $repo.AssemblyVersion + '/IINACT.zip' | |
$repo.DownloadLinkTesting = 'https://github.com/marzent/IINACT/releases/download/v' + $repo.TestingAssemblyVersion + '/IINACT.zip' | |
$repo.DownloadLinkUpdate = $repo.DownloadLinkInstall | |
$repo | ConvertTo-Json | % { "[`n" + $_ + "`n]" } | Set-Content 'repo.json' | |
- name: Create Release | |
if: ${{ env.RELEASE_VERSION != '0.0.0.0' }} | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: IINACT.zip | |
name: IINACT ${{ env.RELEASE_VERSION }} | |
tag_name: v${{ env.RELEASE_VERSION }} | |
prerelease: false | |
append_body: true | |
body_path: .github/release-notices.md | |
generate_release_notes: true | |
fail_on_unmatched_files: true | |
- name: Commit repo.json | |
if: ${{ env.RELEASE_VERSION != '0.0.0.0' }} | |
run: | | |
git config --global user.name "Actions User" | |
git config --global user.email "[email protected]" | |
git fetch origin main | |
git checkout main | |
git add repo.json | |
git commit -m "[CI] updating repo.json for ${{ env.RELEASE_VERSION }}" || true | |
git push origin main | |