Merge pull request #608 from hadashiA/ku/1.14.0 #86
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: ["[0-9]+.[0-9]+.[0-9]+*"] | |
branches: ['release-test'] | |
jobs: | |
build-unity: | |
runs-on: ubuntu-latest | |
env: | |
UNITY_LICENSE_FILE: ./tmp/ulf | |
UNITY_BIN: /opt/Unity/Editor/Unity | |
container: | |
image: gableroux/unity3d:2020.1.13f1-linux-il2cpp | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Decode Unity License File | |
run: | | |
mkdir ./tmp | |
echo -n ${{ secrets.UNITY_LICENSE_2020_1_BASE64 }} | base64 --decode > $UNITY_LICENSE_FILE | |
- run: $UNITY_BIN -quit -batchmode -nographics -silent-crashes -logFile -manualLicenseFile $UNITY_LICENSE_FILE || exit 0 | |
# set release tag(*.*.*) to env.GIT_TAG | |
- run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
- name: Export unitypackage | |
run: $UNITY_BIN -quit -batchmode -nographics -logFile /dev/stdout -exportPackage Assets/VContainer/Runtime Assets/VContainer/Editor VContainer.${{ env.GIT_TAG }}.unitypackage -projectPath ./ | |
working-directory: VContainer | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
8.0.x | |
- name: Build SourceGenerator | |
run: | | |
dotnet build -c Release ./VContainer.SourceGenerator | |
dotnet build -c Release ./VContainer.SourceGenerator.Roslyn3 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: VContainer.${{ env.GIT_TAG }} | |
path: | | |
./VContainer/VContainer.${{ env.GIT_TAG }}.unitypackage | |
./VContainer.SourceGenerator/bin/Release/netstandard2.0/VContainer.SourceGenerator.dll | |
./VContainer.SourceGenerator.Roslyn3/bin/Release/netstandard2.0/VContainer.SourceGenerator.Roslyn3.dll | |
# create-release: | |
# needs: [build-unity] | |
# runs-on: ubuntu-latest | |
# steps: | |
# - run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
# # Create Releases | |
# - uses: actions/create-release@v1 | |
# id: create_release | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# tag_name: ${{ env.GIT_TAG }} | |
# release_name: v${{ env.GIT_TAG }} | |
# # Download(All) Artifacts to current directory | |
# - uses: actions/download-artifact@v2-preview | |
# # Upload to Releases(unitypackage) | |
# - uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# upload_url: ${{ steps.create_release.outputs.upload_url }} | |
# asset_path: ./VContainer.${{ env.GIT_TAG }}.unitypackage | |
# asset_name: VContainer.${{ env.GIT_TAG }}.unitypackage | |
# asset_content_type: application/octet-stream |