From 2ce9f243f49b40ff3d1cc44283f1c2e538ec7d7d Mon Sep 17 00:00:00 2001 From: Nestorboy <35258953+Nestorboy@users.noreply.github.com> Date: Sat, 19 Aug 2023 21:17:14 +0200 Subject: [PATCH] Began setting up automation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Added release.yml for automation. --- .github/workflows/release.yml | 55 +++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8b8877d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,55 @@ +name: Build Release + +on: + workflow_dispatch: + +env: + packageName: "com.nessie.udon.movement" + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v3 + + - name: get version + id: version + uses: notiz-dev/github-action-json-property@7c8cf5cc36eb85d8d287a8086a39dac59628eb31 + with: + path: "Packages/${{env.packageName}}/package.json" + prop_path: "version" + + - name: Set Environment Variables + run: | + echo "zipFile=${{ env.packageName }}-${{ steps.version.outputs.prop }}".zip >> $GITHUB_ENV + echo "unityPackage=${{ env.packageName }}-${{ steps.version.outputs.prop }}.unitypackage" >> $GITHUB_ENV + + - name: Create Zip + uses: thedoctor0/zip-release@09336613be18a8208dfa66bd57efafd9e2685657 + with: + type: "zip" + directory: "Packages/${{env.packageName}}/" + filename: "../../${{env.zipFile}}" # make the zip file two directories up, since we start two directories in above + + - run: find "Packages/${{env.packageName}}/" -name \*.meta >> metaList + + - name: Create UnityPackage + uses: pCYSl5EDgo/create-unitypackage@cfcd3cf0391a5ef1306342794866a9897c32af0b + with: + package-path: ${{ env.unityPackage }} + include-files: metaList + + + - name: Make Release + uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 + with: + tag_name: ${{ steps.version.outputs.prop }} + files: | + ${{ env.zipFile }} + ${{ env.unityPackage }} + Packages/${{ env.packageName }}/package.json \ No newline at end of file