Skip to content

feat: Update container with my needs #49

feat: Update container with my needs

feat: Update container with my needs #49

name: Publish Unity3d Package
on:
push:
branches:
- main
jobs:
publish:
name: build, pack & publish
runs-on: ubuntu-latest
env:
REPO_ROOT: 'repo/'
REPO_UPM: 'repoUpm/'
PKG_ROOT: 'upmOutput/'
PUBLISH_BRANCH: 'upm'
COMMIT_MESSAGE: Update UPM branch
steps:
- uses: actions/checkout@v2
with:
path: ${{ env.REPO_ROOT }}
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: CSharp Project To Unity3d Package
uses: PereViader/[email protected]
with:
inputPath: ${{ env.REPO_ROOT }}
outputPath: ${{ env.PKG_ROOT }}
- uses: actions/checkout@v2
with:
ref: ${{ env.PUBLISH_BRANCH }}
path: ${{ env.REPO_UPM }}
- name: Publish to repo branch
run: |
cd $REPO_UPM
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
sudo mv .git ../$PKG_ROOT.git
echo Move git folder to the new built folder
cd ../$PKG_ROOT
git add -Af # add untracked files to the index
git commit -v -m "$COMMIT_MESSAGE"
echo Commit changed files
git status
echo Status
git log
echo Reflog
git push -u origin $PUBLISH_BRANCH