v5.3.0 - Optimasi Total: Rounding Fix, HDD DeviceIoControl, Custom Wa… #147
This file contains hidden or 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: CI (Release) | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: 'true' | |
| - name: Initialize submodules | |
| run: git submodule update --init --recursive | |
| - uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Restore dependencies | |
| run: dotnet restore BoneFish.sln | |
| - name: Build | |
| run: dotnet build BoneFish.sln -c Release --no-restore | |
| - name: Publish | |
| run: dotnet publish -p:PublishSingleFile=true -p:DebugType=None -p:DebugSymbols=false -p:CommitHash=${{ github.sha }} -p:CommitRef=${{ github.ref_type }}/${{ github.ref_name }} -p:SelfContained=false -r win-x64 -c Release .\Bloxstrap\Bloxstrap.csproj | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: BoneFish-Release | |
| path: .\Bloxstrap\bin\Release\net9.0-windows\win-x64\publish\BoneFish.exe | |
| if-no-files-found: error | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: BoneFish-Release | |
| path: release | |
| - name: Rename binaries | |
| run: mv release/BoneFish.exe BoneFish.exe | |
| - name: Create release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| draft: true | |
| files: BoneFish.exe | |
| name: BoneFish ${{ github.ref_name }} | |
| fail_on_unmatched_files: true | |
| release-test: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/release-test') | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: BoneFish-Release | |
| path: release | |
| - name: Rename binaries | |
| run: mv release/BoneFish.exe BoneFish.exe | |
| - name: Create release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| draft: true | |
| files: BoneFish.exe | |
| name: BoneFish ${{ github.ref_name }} | |
| fail_on_unmatched_files: true | |
| auto-release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Get version from csproj | |
| id: get_version | |
| run: | | |
| VERSION=$(grep -oP '<Version>\K[^<]+' Bloxstrap/Bloxstrap.csproj) | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Download artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: BoneFish-Release | |
| path: release | |
| - name: Rename binaries | |
| run: mv release/BoneFish.exe BoneFish.exe | |
| - name: Extract changelog for this version | |
| id: changelog | |
| run: | | |
| VERSION="${{ steps.get_version.outputs.version }}" | |
| # Extract the section for this version from CHANGELOG.md | |
| # Match from '## v{VERSION}' to the next '## v' or end of file | |
| NOTES=$(awk -v ver="$VERSION" ' | |
| /^## v[0-9]/ { found=0 } | |
| $0 ~ "^## v" ver "[ \t-]" || $0 ~ "^## v" ver "$" { found=1; print; next } | |
| found && /^## v[0-9]/ { exit } | |
| found { print } | |
| ' CHANGELOG.md) | |
| if [ -z "$NOTES" ]; then | |
| NOTES="No changelog entry found for v$VERSION. See CHANGELOG.md for details." | |
| fi | |
| # Write to file to avoid shell escaping issues | |
| echo "$NOTES" > /tmp/release_body.md | |
| echo "has_changelog=true" >> $GITHUB_OUTPUT | |
| - name: Create auto release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| tag_name: v${{ steps.get_version.outputs.version }} | |
| name: BoneFish v${{ steps.get_version.outputs.version }} | |
| body_path: /tmp/release_body.md | |
| files: BoneFish.exe | |
| draft: false | |
| prerelease: false |