diff --git a/.github/workflows/build-listing.yml b/.github/workflows/build-listing.yml index dd52397..36581ea 100644 --- a/.github/workflows/build-listing.yml +++ b/.github/workflows/build-listing.yml @@ -36,17 +36,19 @@ jobs: uses: actions/checkout@v4 with: repository: vrchat-community/package-list-action - path: ${{env.pathToCi}} + path: ${{ env.pathToCi }} clean: false # otherwise the local repo will no longer be checked out + - name: Deploy the global.json file + run: cp "${{ github.workspace }}/global.json" "${{ env.pathToCi }}/" - name: Restore Cache uses: actions/cache@v4 with: path: | - ${{env.pathToCi}}/.nuke/temp + ${{ env.pathToCi }}/.nuke/temp ~/.nuget/packages key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }} - name: Build Package Version Listing - run: ${{env.pathToCi}}/build.cmd BuildMultiPackageListing --root ${{env.pathToCi}} --list-publish-directory $GITHUB_WORKSPACE/${{env.listPublishDirectory}} + run: '"${{ env.pathToCi }}/build.cmd" BuildMultiPackageListing --root "${{ env.pathToCi }}" --list-publish-directory "$GITHUB_WORKSPACE/${{ env.listPublishDirectory }}"' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Setup Pages @@ -57,7 +59,7 @@ jobs: - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - path: ${{env.listPublishDirectory}} + path: ${{ env.listPublishDirectory }} - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 diff --git a/.github/workflows/build-on-push.yml b/.github/workflows/build-on-push.yml new file mode 100644 index 0000000..c2ff16e --- /dev/null +++ b/.github/workflows/build-on-push.yml @@ -0,0 +1,37 @@ +name: Build on push to feature branch for testing +on: + push: + branches: + - '*' + - '!main' +permissions: + contents: read +env: + listPublishDirectory: Website + pathToCi: ci +jobs: + build: + name: Build the page + runs-on: ubuntu-latest + steps: + - name: Check out the repository + uses: actions/checkout@v4 + - name: Check out the automation repository + uses: actions/checkout@v4 + with: + repository: vrchat-community/package-list-action + path: ${{ env.pathToCi }} + clean: false # otherwise the local repo will no longer be checked out + - name: Deploy the global.json file + run: cp "${{ github.workspace }}/global.json" "${{ env.pathToCi }}/" + - name: Restore Cache + uses: actions/cache@v4 + with: + path: | + ${{ env.pathToCi }}/.nuke/temp + ~/.nuget/packages + key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }} + - name: Build Package Version Listing + run: '"${{ env.pathToCi }}/build.cmd" BuildMultiPackageListing --root "${{ env.pathToCi }}" --list-publish-directory "$GITHUB_WORKSPACE/${{ env.listPublishDirectory }}"' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..60c3aae --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +dotnet 8.0.403 diff --git a/.vscode/settings.json b/.vscode/settings.json index 89fab96..6a203e2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,7 +4,8 @@ "explorer.fileNesting.patterns": { "*.md": "${capture}.*.md", ".gitattributes": ".gitignore", - ".markdownlint.*": ".markdownlint-cli2.*" + ".markdownlint.*": ".markdownlint-cli2.*", + ".tool-versions": "global.json" }, "files.associations": { ".imgbotconfig": "json", diff --git a/cspell.config.yml b/cspell.config.yml index de811dc..79a84ca 100644 --- a/cspell.config.yml +++ b/cspell.config.yml @@ -5,13 +5,13 @@ enableGlobDot: true features: weighted-suggestions: true globRoot: ${cwd} -language: en,ja ignorePaths: - .*ignore - .git - .github/CODE_OF_CONDUCT.* - .vscode/extensions.json - cspell.config.yml +language: en,ja useGitignore: true version: '0.2' words: diff --git a/global.json b/global.json new file mode 100644 index 0000000..52c0d7c --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "rollForward": "latestMinor", + "version": "8.0.403" + } +}