From bab265beff763669e4c6f92f0d3970373c4f19d0 Mon Sep 17 00:00:00 2001 From: kurone-kito Date: Thu, 10 Oct 2024 11:11:27 +0900 Subject: [PATCH] ci: added the CI scripts for testing --- .github/workflows/push.yml | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/push.yml diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 0000000..db9e587 --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,47 @@ +name: The CI workflow on push +on: + push: + branches: + - '*' + - '!main' +permissions: + contents: read +jobs: + build: + runs-on: ubuntu-latest + env: + packagePath: Packages/${{ vars.PACKAGE_NAME }} + zipFile: + steps: + - name: Checkout Local Repository + uses: actions/checkout@v4 + - name: Configure the Environment Variables needed for releasing the Package + run: | + echo "zipFile=${{ vars.PACKAGE_NAME }}-feature.zip" >> $GITHUB_ENV + - name: Zip the Package for testing + working-directory: "${{ env.packagePath }}" + run: zip -r "${{ github.workspace }}/${{ env.zipFile }}" . + - name: Build a list of .meta files for future use + run: find "${{ env.packagePath }}/" -name \*.meta >> metaList + - name: Make a UnityPackage version of the Package for release + uses: pCYSl5EDgo/create-unitypackage@v1 + with: + package-path: ${{ env.unityPackage }} + include-files: metaList + - name: Checkout Automation Repository without removing prior checkouts + uses: actions/checkout@v4 + with: + repository: vrchat-community/package-list-action + path: ${{ env.pathToCi }} + clean: false + - name: Load cached data from previous runs + uses: actions/cache@v4 + with: + path: | + ${{ env.pathToCi }}/.nuke/temp + ~/.nuget/packages + key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }} + - name: Build Package Version Listing with Nuke + run: ${{ env.pathToCi }}/build.cmd BuildRepoListing --root ${{ env.pathToCi }} --list-publish-directory $GITHUB_WORKSPACE/${{ env.listPublishDirectory }} --current-package-name ${{ vars.PACKAGE_NAME }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}