Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .github/thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
106 changes: 106 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Build Bleeding Edge

on:
workflow_dispatch:
push:
branches: main
paths: package.json

env:
packageName: "com.inf.my-hierarchy"
packagePath: "Packages/com.inf.my-hierarchy"
packageFileName: "My-Hierarchy"
packageReleaseName: "Bleeding Edge"

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v3

- name: Get Version
id: version
uses: zoexx/github-action-json-file-properties@b9f36ce6ee6fe2680cd3c32b2c62e22eade7e590
with:
file_path: "./package.json"
prop_path: "version"

- name: Generate Tag
id: tag
run: echo prop="${{ steps.version.outputs.value }}BE" >> $GITHUB_OUTPUT

- name: Check If Release Tag Exists
id: checkReleaseTag
uses: mukunku/tag-exists-action@v1.2.0
with:
tag: ${{ steps.tag.outputs.prop }}

- name: Set Environment Variables
if: ${{ steps.checkReleaseTag.outputs.exists == 'false' }}
run: |
echo "zipFile=${{ env.packageFileName }}_v${{ steps.version.outputs.value }}_VPM".zip >> $GITHUB_ENV
echo "unityPackage=${{ env.packageFileName }}_v${{ steps.version.outputs.value }}.unitypackage" >> $GITHUB_ENV

- name: Set ZIP Url
uses: jossef/action-set-json-field@v2.1
with:
file: ./package.json
field: url
value: 'https://github.com/${{ github.repository }}/releases/download/${{ steps.tag.outputs.prop }}/${{ env.zipFile }}'

- name: Set UnityPackage Url
uses: jossef/action-set-json-field@v2.1
with:
file: ./package.json
field: unityPackage
value: 'https://github.com/${{ github.repository }}/releases/download/${{ steps.tag.outputs.prop }}/${{ env.unityPackage }}'

- name: Create directory and move files
if: ${{ steps.checkReleaseTag.outputs.exists == 'false' }}
run: |
mkdir -p ${{env.packagePath}}
rsync -r --exclude="${{ env.packagePath }}" ./ "${{ env.packagePath }}"/

- name: Create Zip
if: ${{ steps.checkReleaseTag.outputs.exists == 'false' }}
uses: thedoctor0/zip-release@09336613be18a8208dfa66bd57efafd9e2685657
with:
type: "zip"
directory: "${{env.packagePath}}/"
filename: "../../${{env.zipFile}}" # make the zip file two directories up, since we start two directories in above
exclusions: "*.git* *.github* .gitignore Packages/"

- run: find "${{env.packagePath}}" -name \*.meta >> metaList
if: ${{ steps.checkReleaseTag.outputs.exists == 'false' }}

- name: Create UnityPackage
if: ${{ steps.checkReleaseTag.outputs.exists == 'false' }}
uses: pCYSl5EDgo/create-unitypackage@cfcd3cf0391a5ef1306342794866a9897c32af0b
with:
package-path: ${{ env.unityPackage }}
include-files: metaList

- name: Add Icon to UnityPackage
if: ${{ steps.checkReleaseTag.outputs.exists == 'false' }}
uses: foxscore/add-icon-to-unitypackage@v1
with:
package_path: ${{ env.unityPackage }}
icon_path: '.github/thumbnail.png'
package_not_found_behavior: 'warn'
icon_not_found_behavior: 'warn'
icon_already_present_behavior: 'warn'

- name: Make Release
if: ${{ steps.checkReleaseTag.outputs.exists == 'false' }}
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
with:
name: "${{ env.packageReleaseName }} v${{ steps.version.outputs.value }}"
tag_name: "${{ steps.tag.outputs.prop }}"
files: |
${{ env.zipFile }}
${{ env.unityPackage }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ ExportedObj/
*.pidb.meta
*.pdb.meta
*.mdb.meta
*.meta

# Unity3D generated file on crash reports
sysinfo.txt
Expand Down
8 changes: 0 additions & 8 deletions Editor.meta

This file was deleted.

8 changes: 0 additions & 8 deletions Editor/Core.meta

This file was deleted.

Loading