Skip to content

Commit 664a818

Browse files
authored
Update build-release.yml
1 parent a39ad0a commit 664a818

File tree

1 file changed

+5
-60
lines changed

1 file changed

+5
-60
lines changed

.github/workflows/build-release.yml

Lines changed: 5 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -16,67 +16,22 @@ jobs:
1616
- uses: actions/checkout@v2
1717
- uses: actions/setup-dotnet@v1
1818
with:
19-
dotnet-version: 3.1.x
19+
dotnet-version: 5.0.100
2020
# set release tag(*.*.*) to env.GIT_TAG
2121
- run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
2222

2323
# build CommandTools first (using dotnet run command in ZLogger.csproj)
24-
- run: dotnet build -c Release src/Ulid -p:Version=${{ env.GIT_TAG }}
25-
- run: dotnet build -c Release src/Ulid.Cli -p:Version=${{ env.GIT_TAG }}
26-
- run: dotnet build -c Release src/Ulid.MessagePack -p:Version=${{ env.GIT_TAG }}
27-
- run: dotnet build -c Release src/Ulid.SystemTextJson -p:Version=${{ env.GIT_TAG }}
28-
- run: dotnet test -c Release ./tests/Ulid.Tests -p:Version=${{ env.GIT_TAG }}
29-
- run: dotnet test -c Release ./tests/Ulid.Cli.Tests -p:Version=${{ env.GIT_TAG }}
30-
- run: dotnet test -c Release ./tests/Ulid.MessagePack.Tests -p:Version=${{ env.GIT_TAG }}
31-
- run: dotnet test -c Release ./tests/Ulid.SystemTextJson.Tests -p:Version=${{ env.GIT_TAG }}
32-
- run: dotnet pack ./src/Ulid -c Release --no-build -p:Version=${{ env.GIT_TAG }} -o ./publish
33-
- run: dotnet pack ./src/Ulid.Cli -c Release --no-build -p:Version=${{ env.GIT_TAG }} -o ./publish
34-
- run: dotnet pack ./src/Ulid.MessagePack -c Release --no-build -p:Version=${{ env.GIT_TAG }} -o ./publish
35-
- run: dotnet pack ./src/Ulid.SystemTextJson -c Release --no-build -p:Version=${{ env.GIT_TAG }} -o ./publish
24+
- run: dotnet build -c Release src/UnitGenerator -p:Version=${{ env.GIT_TAG }}
25+
- run: dotnet pack ./src/UnitGenerator -c Release --no-build -p:Version=${{ env.GIT_TAG }} -o ./publish
3626

3727
# Store artifacts.
3828
- uses: actions/upload-artifact@v2
3929
with:
4030
name: nuget
4131
path: ./publish/
4232

43-
build-unity:
44-
strategy:
45-
matrix:
46-
unity: ["2019.3.9f1"]
47-
include:
48-
- unity: 2019.3.9f1
49-
license: UNITY_2019_3
50-
runs-on: ubuntu-latest
51-
container:
52-
# with linux-il2cpp. image from https://hub.docker.com/r/gableroux/unity3d/tags
53-
image: gableroux/unity3d:${{ matrix.unity }}-linux-il2cpp
54-
steps:
55-
- run: apt update && apt install git -y
56-
- uses: actions/checkout@v2
57-
- run: echo -n "$UNITY_LICENSE" >> .Unity.ulf
58-
env:
59-
UNITY_LICENSE: ${{ secrets[matrix.license] }}
60-
- run: /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -manualLicenseFile .Unity.ulf || exit 0
61-
62-
# set release tag(*.*.*) to env.GIT_TAG
63-
- run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
64-
65-
# Execute scripts: Export Package
66-
- name: Export unitypackage
67-
run: /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod PackageExporter.Export
68-
working-directory: src/Ulid.Unity
69-
env:
70-
UNITY_PACKAGE_VERSION: ${{ env.GIT_TAG }}
71-
72-
# Store artifacts.
73-
- uses: actions/upload-artifact@v1
74-
with:
75-
name: Ulid.Unity.${{ env.GIT_TAG }}.unitypackage
76-
path: ./src/Ulid.Unity/Ulid.Unity.${{ env.GIT_TAG }}.unitypackage
77-
7833
create-release:
79-
needs: [build-dotnet, build-unity]
34+
needs: [build-dotnet]
8035
runs-on: ubuntu-latest
8136
env:
8237
DOTNET_CLI_TELEMETRY_OPTOUT: 1
@@ -86,7 +41,7 @@ jobs:
8641
# setup dotnet for nuget push
8742
- uses: actions/setup-dotnet@v1
8843
with:
89-
dotnet-version: 3.1.201
44+
dotnet-version: 5.0.100
9045
# set release tag(*.*.*) to env.GIT_TAG
9146
- run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
9247

@@ -104,13 +59,3 @@ jobs:
10459

10560
# Upload to NuGet
10661
- run: dotnet nuget push "./nuget/*.nupkg" -s https://www.nuget.org/api/v2/package -k ${{ secrets.NUGET_KEY }}
107-
108-
# Upload to Releases(unitypackage)
109-
- uses: actions/upload-release-asset@v1
110-
env:
111-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112-
with:
113-
upload_url: ${{ steps.create_release.outputs.upload_url }}
114-
asset_path: ./Ulid.Unity.${{ env.GIT_TAG }}.unitypackage/Ulid.Unity.${{ env.GIT_TAG }}.unitypackage
115-
asset_name: Ulid.Unity.${{ env.GIT_TAG }}.unitypackage
116-
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)