|
| 1 | +concurrency: |
| 2 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 3 | + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} |
1 | 4 | name: The CI workflow on push |
2 | 5 | on: |
3 | 6 | push: |
4 | 7 | branches: |
5 | 8 | - '*' |
6 | 9 | - '!main' |
7 | | -permissions: |
8 | | - contents: read |
| 10 | + pull_request: |
9 | 11 | jobs: |
10 | | - build: |
11 | | - env: |
12 | | - listPublishDirectory: Website |
13 | | - packagePath: Packages/${{ vars.PACKAGE_NAME }} |
14 | | - pathToCi: ci |
15 | | - unityPackage: ${{ vars.PACKAGE_NAME }}-feature.unitypackage |
16 | | - zipFile: ${{ vars.PACKAGE_NAME }}-feature.zip |
| 12 | + lint: |
17 | 13 | runs-on: ubuntu-latest |
18 | 14 | steps: |
19 | 15 | - name: Checkout Local Repository |
20 | 16 | uses: actions/checkout@v4 |
21 | | - - name: Zip the Package for testing |
22 | | - run: zip -r "${{ github.workspace }}/${{ env.zipFile }}" . |
23 | | - working-directory: "${{ env.packagePath }}" |
24 | | - - name: Build a list of .meta files for future use |
25 | | - run: find "${{ env.packagePath }}/" -name '*.meta' -type f >> metaList |
26 | | - - name: Make a UnityPackage version of the Package for release |
27 | | - uses: pCYSl5EDgo/create-unitypackage@v1 |
28 | | - with: |
29 | | - include-files: metaList |
30 | | - package-path: ${{ env.unityPackage }} |
31 | | - - name: Checkout Automation Repository without removing prior checkouts |
32 | | - uses: actions/checkout@v4 |
33 | | - with: |
34 | | - clean: false |
35 | | - path: ${{ env.pathToCi }} |
36 | | - repository: vrchat-community/package-list-action |
37 | | - - name: Deploy the global.json file |
38 | | - run: cp "${{ github.workspace }}/global.json" "${{ env.pathToCi }}/" |
39 | | - - name: Load cached data from previous runs |
40 | | - uses: actions/cache@v4 |
41 | | - with: |
42 | | - key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }} |
43 | | - path: | |
44 | | - ${{ env.pathToCi }}/.nuke/temp |
45 | | - ~/.nuget/packages |
46 | | - - env: |
47 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
48 | | - name: Build Package Version Listing with Nuke |
49 | | - run: '"${{ env.pathToCi }}/build.cmd" BuildRepoListing --root "${{ env.pathToCi }}" --list-publish-directory "$GITHUB_WORKSPACE/${{ env.listPublishDirectory }}" --current-package-name "${{ vars.PACKAGE_NAME }}"' |
| 17 | + - name: Run cspell |
| 18 | + uses: streetsidesoftware/cspell-action@v7 |
| 19 | + - name: Run markdownlint |
| 20 | + uses: DavidAnson/markdownlint-cli2-action@v20 |
| 21 | + package: |
| 22 | + permissions: |
| 23 | + actions: write |
| 24 | + contents: read |
| 25 | + secrets: inherit |
| 26 | + uses: ./.github/workflows/package-build.yml |
| 27 | + with: |
| 28 | + packagePath: Packages/${{ vars.PACKAGE_NAME }} |
| 29 | + unityPackage: ${{ vars.PACKAGE_NAME }}-feature.unitypackage |
| 30 | + zipFile: ${{ vars.PACKAGE_NAME }}-feature.zip |
| 31 | + website: |
| 32 | + needs: package |
| 33 | + permissions: |
| 34 | + actions: write |
| 35 | + contents: read |
| 36 | + uses: ./.github/workflows/build-website.yml |
| 37 | + with: |
| 38 | + listPublishDirectory: Website |
| 39 | + pathToCi: ci |
| 40 | + zipFile: ${{ vars.PACKAGE_NAME }}-feature.zip |
| 41 | + unityPackage: ${{ vars.PACKAGE_NAME }}-feature.unitypackage |
0 commit comments