name: Update JSON files on wiki on: push: branches: [ master, jsondump ] paths: - '.github/workflows/update-wiki.yml' - 'Content.Shared/Chemistry/**.cs' - 'Content.Server/Chemistry/**.cs' - 'Content.Server/GuideGenerator/**.cs' - 'Resources/Prototypes/Reagents/**.yml' - 'Resources/Prototypes/Chemistry/**.yml' - 'Resources/Prototypes/Recipes/Reactions/**.yml' - 'RobustToolbox/' jobs: wiki: name: Build and publish JSON for the wiki runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Setup submodule run: | git submodule update --init --recursive - name: Pull engine updates uses: space-wizards/submodule-dependency@v0.1.5 - name: Update Engine Submodules run: | cd RobustToolbox/ git submodule update --init --recursive - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: dotnet-version: 6.0.100 - name: Install dependencies run: dotnet restore - name: Build run: dotnet build --configuration Release --no-restore /p:WarningsAsErrors=nullable /m - name: Generate JSON run: dotnet ./bin/Content.Server/Content.Server.dll --cvar autogen.destination_file=prototypes.json continue-on-error: true - name: Upload chem_prototypes.json uses: jtmullen/mediawiki-edit-action@v0.1.1 with: wiki_text_file: ./bin/Content.Server/data/chem_prototypes.json edit_summary: Update chem_prototypes.json via GitHub Actions page_name: "${{ secrets.WIKI_PAGE_ROOT }}/chem_prototypes.json" api_url: https://wiki.spacestation14.io/w/api.php username: ${{ secrets.WIKI_BOT_USER }} password: ${{ secrets.WIKI_BOT_PASS }} - name: Upload react_prototypes.json uses: jtmullen/mediawiki-edit-action@v0.1.1 with: wiki_text_file: ./bin/Content.Server/data/react_prototypes.json edit_summary: Update react_prototypes.json via GitHub Actions page_name: "${{ secrets.WIKI_PAGE_ROOT }}/react_prototypes.json" api_url: https://wiki.spacestation14.io/w/api.php username: ${{ secrets.WIKI_BOT_USER }} password: ${{ secrets.WIKI_BOT_PASS }}