Fix this stupid refresh bug. #5
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: Build & Release | ||
| on: | ||
| # manual trigger with a required version/tag input | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| required: true | ||
| description: 'Tag / version (e.g. v1.2.3)' | ||
| permissions: | ||
| contents: write # needed by release‑action | ||
| packages: read | ||
| jobs: | ||
| # ---------- BUILD ---------- | ||
| build: | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| # desktop | ||
| - os: windows-latest ; rid: win-x64 ; fw: net9.0-windows10.0.19041.0 ; art: win-x64 | ||
| - os: windows-latest ; rid: win-arm64 ; fw: net9.0-windows10.0.19041.0 ; art: win-arm64 | ||
| - os: ubuntu-latest ; rid: linux-x64 ; fw: net9.0 ; art: linux-x64 | ||
| - os: ubuntu-latest ; rid: linux-arm64 ; fw: net9.0 ; art: linux-arm64 | ||
| - os: macos-latest ; rid: osx-arm64 ; fw: net9.0-macos ; art: macos-arm64 | ||
| # mobile | ||
| - os: windows-latest ; rid: android-arm64 ; fw: net9.0-android ; art: android-arm64 | ||
| steps: | ||
| # main repo | ||
| - uses: actions/checkout@v4 | ||
| # clone Sachya *exactly* where the .sln expects it | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| repository: rarisma/sachya | ||
| path: SACHYA # matches 'SACHYA/…' casing in solution | ||
| # install SDK (cached) | ||
| - uses: actions/setup-dotnet@v4 | ||
| with: | ||
| global-json-file: global.json # keeps you on .NET 9 preview channel | ||
| cache: true # enables built‑in NuGet cache | ||
| # Android workload only when needed | ||
| - if: contains(matrix.art, 'android') | ||
| run: dotnet workload install android | ||
| # restore once per job (already cached) | ||
| - run: dotnet restore Alua.sln | ||
| # publish | ||
| - run: | | ||
| dotnet publish Alua/Alua.csproj \ | ||
| -c Release \ | ||
| -f ${{ matrix.fw }} \ | ||
| -r ${{ matrix.rid }} \ | ||
| --self-contained true \ | ||
| -p:PublishSingleFile=true \ | ||
| -o publish | ||
| # compress | ||
| - name: Archive ${{ matrix.art }} | ||
| run: | | ||
| cd publish | ||
| 7z a ../${{ matrix.art }}.zip ./* | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.art }} | ||
| path: ${{ matrix.art }}.zip | ||
| # ---------- RELEASE ---------- | ||
| release: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/download-artifact@v4 | ||
| with: { path: dist } | ||
| - uses: ncipollo/release-action@v1 | ||
| with: | ||
| tag: ${{ github.event.inputs.version }} | ||
| name: ${{ github.event.inputs.version }} | ||
| artifacts: dist/**/*.zip | ||
| generateReleaseNotes: true | ||