fix: Testing deployment #37
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: Deploy Build | |
| on: | |
| push: | |
| branches: | |
| - stable | |
| jobs: | |
| build: | |
| name: Build and Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| - name: Clone game assemblies from private repo | |
| run: | | |
| git clone https://x-access-token:${{ secrets.GH_PAT }}@github.com/KaBooMa/ScheduleOneAssemblies.git ./ScheduleOneAssemblies | |
| - name: Restore .NET dependencies | |
| run: dotnet restore | |
| # Install Node.js and semantic-release | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| - name: Install semantic-release via NPM | |
| run: | | |
| npm install -g semantic-release | |
| # Run semantic-release to handle versioning, changelog, and release | |
| - name: Run semantic-release | |
| id: semantic-release | |
| uses: cycjimmy/semantic-release-action@v4 | |
| with: | |
| branches: | | |
| [ | |
| 'stable' | |
| ] | |
| extra_plugins: | | |
| @semantic-release/changelog | |
| @semantic-release/exec | |
| @semantic-release/git | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_PAT }} | |
| - name: Update MelonInfo version for S1API and S1APILoader | |
| run: | | |
| sed -i "s/{VERSION_NUMBER}/${{ steps.semantic-release.outputs.new_release_version }}/" ./S1API/S1API.cs | |
| sed -i "s/{VERSION_NUMBER}/${{ steps.semantic-release.outputs.new_release_version }}/" ./S1APILoader/S1APILoader.cs | |
| - name: Run .NET build for Mono | |
| run: dotnet build ./S1API.sln -c Mono -f netstandard2.1 | |
| - name: Run .NET build for Il2Cpp | |
| run: dotnet build ./S1API.sln -c Il2Cpp -f netstandard2.1 | |
| - name: Build artifact zip for Thunderstore | |
| run: | | |
| mkdir -p ./artifacts/thunderstore/Plugins/S1API | |
| cp ./S1APILoader/bin/Mono/netstandard2.1/S1APILoader.dll ./artifacts/thunderstore/Plugins/S1APILoader.dll | |
| cp ./S1API/bin/Il2Cpp/netstandard2.1/S1API.dll ./artifacts/thunderstore/Plugins/S1API/S1API.Il2Cpp.dll | |
| cp ./S1API/bin/Mono/netstandard2.1/S1API.dll ./artifacts/thunderstore/Plugins/S1API/S1API.Mono.dll | |
| - name: Publish artifact to Thunderstore | |
| uses: GreenTF/upload-thunderstore-package@v4.3 | |
| with: | |
| namespace: KaBooMa | |
| description: A Schedule One Mono / Il2Cpp Cross Compatibility Layer | |
| token: ${{ secrets.TS_TOKEN }} | |
| name: S1API | |
| repo: thunderstore.io | |
| version: ${{ steps.semantic-release.outputs.new_release_version }} | |
| community: schedule-i | |
| icon: https://raw.githubusercontent.com/KaBooMa/S1API/stable/Public/logo_compressed.png | |
| readme: https://raw.githubusercontent.com/KaBooMa/S1API/stable/Public/README.md | |
| deps: LavaGang-MelonLoader@0.7.0 | |
| path: artifacts/thunderstore | |
| categories: | | |
| mono | |
| il2cpp | |
| libraries |