Skip to content

Commit 9956a34

Browse files
committed
Change Folder Structure
1 parent e2bab05 commit 9956a34

20 files changed

+12
-9
lines changed

.github/workflows/release.yml

+12-9
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
outputs:
1212
config_package: ${{ steps.config_package.outputs.configPackage }}
1313
steps:
14+
15+
# Ensure that required repository variable has been created for the Package
1416
- name: Validate Package Config
1517
id: config_package
1618
run: |
@@ -21,50 +23,51 @@ jobs:
2123
fi
2224
2325
# Build and release the Package
26+
# If the repository is not configured properly, this job will be skipped
2427
build:
2528
needs: config
2629
runs-on: ubuntu-latest
2730
permissions:
2831
contents: write
2932
env:
30-
packagePath: .
33+
packagePath: Packages/${{ vars.PACKAGE_NAME }}
3134
if: needs.config.outputs.config_package == 'true'
3235
steps:
3336

3437
# Checkout Local Repository
3538
- name: Checkout
36-
uses: actions/checkout@v3
39+
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
3740

3841
# Get the Package version based on the package.json file
3942
- name: Get Version
4043
id: version
4144
uses: zoexx/github-action-json-file-properties@b9f36ce6ee6fe2680cd3c32b2c62e22eade7e590
4245
with:
43-
file_path: "./package.json"
46+
file_path: "${{ env.packagePath }}/package.json"
4447
prop_path: "version"
4548

4649
# Configure the Environment Variables needed for releasing the Package
4750
- name: Set Environment Variables
4851
run: |
49-
echo "zipFile=${{ vars.PACKAGE_NAME }}-${{ steps.version.outputs.value }}.zip" >> $GITHUB_ENV
52+
echo "zipFile=${{ vars.PACKAGE_NAME }}-${{ steps.version.outputs.value }}".zip >> $GITHUB_ENV
5053
echo "unityPackage=${{ vars.PACKAGE_NAME }}-${{ steps.version.outputs.value }}.unitypackage" >> $GITHUB_ENV
5154
echo "version=${{ steps.version.outputs.value }}" >> $GITHUB_ENV
5255
5356
# Zip the Package for release
5457
- name: Create Package Zip
58+
working-directory: "${{ env.packagePath }}"
5559
run: zip -r "${{ github.workspace }}/${{ env.zipFile }}" .
5660

5761
# Build a list of .meta files for future use
5862
- name: Track Package Meta Files
59-
run: find . -name \*.meta >> metaList
63+
run: find "${{ env.packagePath }}/" -name \*.meta >> metaList
6064

6165
# Make a UnityPackage version of the Package for release
6266
- name: Create UnityPackage
6367
uses: pCYSl5EDgo/create-unitypackage@cfcd3cf0391a5ef1306342794866a9897c32af0b
6468
with:
65-
package-path: ./
69+
package-path: ${{ env.unityPackage }}
6670
include-files: metaList
67-
output-path: "${{ github.workspace }}/${{ env.unityPackage }}" # Full path to the output file
6871

6972
# Make a release tag of the version from the package.json file
7073
- name: Create Tag
@@ -80,5 +83,5 @@ jobs:
8083
files: |
8184
${{ env.zipFile }}
8285
${{ env.unityPackage }}
83-
./package.json
84-
tag_name: ${{ env.version }}
86+
${{ env.packagePath }}/package.json
87+
tag_name: ${{ env.version }}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)