release?
This commit is contained in:
parent
7dd822fc9b
commit
2324c6e929
107
.github/workflows/build-release.yml
vendored
107
.github/workflows/build-release.yml
vendored
@ -20,35 +20,21 @@ jobs:
|
||||
update-packagejson:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TARGET_FILE: ./src/MessagePipe.Unity/Assets/Plugins/MessagePipe/package.json
|
||||
TARGET_FILE2: ./src/MessagePipe.Unity/Assets/Plugins/MessagePipe.VContainer/package.json
|
||||
TARGET_FILE3: ./src/MessagePipe.Unity/Assets/Plugins/MessagePipe.Zenject/package.json
|
||||
TARGET_FILE4: ./src/MessagePipe.Unity/Assets/Plugins/MessagePipe.Interprocess/package.json
|
||||
TARGET_FILE: ./src/ObservableCollections/Assets/Plugins/ObservableCollections/package.json
|
||||
outputs:
|
||||
sha: ${{ steps.commit.outputs.sha }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Output package.json (Before)
|
||||
run: |
|
||||
cat ${{ env.TARGET_FILE}}
|
||||
cat ${{ env.TARGET_FILE2}}
|
||||
cat ${{ env.TARGET_FILE3}}
|
||||
cat ${{ env.TARGET_FILE4}}
|
||||
run: cat ${{ env.TARGET_FILE}}
|
||||
|
||||
- name: Update package.json to version ${{ env.GIT_TAG }}
|
||||
run: |
|
||||
sed -i -e "s/\(\"version\":\) \"\(.*\)\",/\1 \"${{ env.GIT_TAG }}\",/" ${{ env.TARGET_FILE }}
|
||||
sed -i -e "s/\(\"version\":\) \"\(.*\)\",/\1 \"${{ env.GIT_TAG }}\",/" ${{ env.TARGET_FILE2 }}
|
||||
sed -i -e "s/\(\"version\":\) \"\(.*\)\",/\1 \"${{ env.GIT_TAG }}\",/" ${{ env.TARGET_FILE3 }}
|
||||
sed -i -e "s/\(\"version\":\) \"\(.*\)\",/\1 \"${{ env.GIT_TAG }}\",/" ${{ env.TARGET_FILE4 }}
|
||||
run: sed -i -e "s/\(\"version\":\) \"\(.*\)\",/\1 \"${{ env.GIT_TAG }}\",/" ${{ env.TARGET_FILE }}
|
||||
|
||||
- name: Check update
|
||||
id: check_update
|
||||
run: |
|
||||
cat ${{ env.TARGET_FILE}}
|
||||
cat ${{ env.TARGET_FILE2}}
|
||||
cat ${{ env.TARGET_FILE3}}
|
||||
cat ${{ env.TARGET_FILE4}}
|
||||
git diff --exit-code || echo "::set-output name=changed::1"
|
||||
|
||||
- name: Commit files
|
||||
@ -90,51 +76,37 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
|
||||
DOTNET_SDK_VERSION: "6.0.x"
|
||||
DOTNET_INCLUDE_PRERELEASE: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
||||
NUGET_XMLDOC_MODE: skip
|
||||
services:
|
||||
redis:
|
||||
image: redis
|
||||
options: >-
|
||||
--health-cmd "redis-cli ping"
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
ports:
|
||||
- 6379:6379
|
||||
steps:
|
||||
- run: echo ${{ needs.update-packagejson.outputs.sha }}
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ needs.update-packagejson.outputs.sha }}
|
||||
- uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
|
||||
include-prerelease: ${{ env.DOTNET_INCLUDE_PRERELEASE }}
|
||||
# build and pack
|
||||
- run: dotnet build ./tools/PostBuildUtility/ -c Release
|
||||
- run: dotnet build -c Release -p:Version=${{ env.GIT_TAG }}
|
||||
- run: dotnet test -c Release --no-build
|
||||
- run: dotnet pack ./src/MessagePipe/MessagePipe.csproj -c Release --no-build -p:Version=${{ env.GIT_TAG }} -o ./publish
|
||||
- run: dotnet pack ./src/MessagePipe.Analyzer/MessagePipe.Analyzer.csproj -c Release --no-build -p:Version=${{ env.GIT_TAG }} -o ./publish
|
||||
- run: dotnet pack ./src/MessagePipe.Redis/MessagePipe.Redis.csproj -c Release --no-build -p:Version=${{ env.GIT_TAG }} -o ./publish
|
||||
- run: dotnet pack ./src/MessagePipe.Interprocess/MessagePipe.Interprocess.csproj -c Release --no-build -p:Version=${{ env.GIT_TAG }} -o ./publish
|
||||
- run: dotnet build ObservableCollection.WithoutSandbox.slnf -c Release -p:Version=${{ env.GIT_TAG }}
|
||||
- run: dotnet test ObservableCollection.WithoutSandbox.slnf -c Release --no-build
|
||||
- run: dotnet pack ./src/ObservableCollections/ObservableCollections.csproj -c Release --no-build -p:Version=${{ env.GIT_TAG }} -o ./publish
|
||||
# Store artifacts.
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: nuget
|
||||
path: ./publish/
|
||||
if-no-files-found: error
|
||||
# Upload analyzer.
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: MessagePipe.Analyzer
|
||||
path: ./src/MessagePipe.Analyzer/bin/Release/netstandard2.0/MessagePipe.Analyzer.dll
|
||||
|
||||
build-unity:
|
||||
needs: [update-packagejson]
|
||||
strategy:
|
||||
matrix:
|
||||
unity: ["2019.3.9f1"]
|
||||
unity: ["2019.4.25f1"]
|
||||
include:
|
||||
- unity: 2019.3.9f1
|
||||
- unity: 2019.4.25f1
|
||||
license: UNITY_LICENSE_2019
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
@ -150,7 +122,7 @@ jobs:
|
||||
env:
|
||||
UNITY_LICENSE: ${{ secrets[matrix.license] }}
|
||||
with:
|
||||
projectPath: src/MessagePipe.Unity
|
||||
projectPath: src/ObservableCollections
|
||||
unityVersion: ${{ matrix.unity }}
|
||||
targetPlatform: StandaloneLinux64
|
||||
buildMethod: PackageExporter.Export
|
||||
@ -164,14 +136,13 @@ jobs:
|
||||
else
|
||||
echo "Great, all .meta files are commited."
|
||||
fi
|
||||
working-directory: src/MessagePipe.Unity
|
||||
working-directory: src/ObservableCollections
|
||||
|
||||
# Store artifacts.
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: MessagePipe.Unity.${{ env.GIT_TAG }}.unitypackage
|
||||
path: ./src/MessagePipe.Unity/MessagePipe*.${{ env.GIT_TAG }}.unitypackage
|
||||
if-no-files-found: error
|
||||
name: ObservableCollections.${{ env.GIT_TAG }}.unitypackage
|
||||
path: ./src/ObservableCollections/ObservableCollections.${{ env.GIT_TAG }}.unitypackage
|
||||
|
||||
create-release:
|
||||
if: github.event.inputs.dry_run == 'false'
|
||||
@ -203,40 +174,8 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./MessagePipe.Analyzer/MessagePipe.Analyzer.dll
|
||||
asset_name: MessagePipe.Analyzer.dll
|
||||
asset_content_type: application/octet-stream
|
||||
- uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./MessagePipe.Unity.${{ env.GIT_TAG }}.unitypackage/MessagePipe.${{ env.GIT_TAG }}.unitypackage
|
||||
asset_name: MessagePipe.${{ env.GIT_TAG }}.unitypackage
|
||||
asset_content_type: application/octet-stream
|
||||
- uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./MessagePipe.Unity.${{ env.GIT_TAG }}.unitypackage/MessagePipe.VContainer.${{ env.GIT_TAG }}.unitypackage
|
||||
asset_name: MessagePipe.VContainer.${{ env.GIT_TAG }}.unitypackage
|
||||
asset_content_type: application/octet-stream
|
||||
- uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./MessagePipe.Unity.${{ env.GIT_TAG }}.unitypackage/MessagePipe.Zenject.${{ env.GIT_TAG }}.unitypackage
|
||||
asset_name: MessagePipe.Zenject.${{ env.GIT_TAG }}.unitypackage
|
||||
asset_content_type: application/octet-stream
|
||||
- uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./MessagePipe.Unity.${{ env.GIT_TAG }}.unitypackage/MessagePipe.Interprocess.${{ env.GIT_TAG }}.unitypackage
|
||||
asset_name: MessagePipe.Interprocess.${{ env.GIT_TAG }}.unitypackage
|
||||
asset_path: ./ObservableCollections.${{ env.GIT_TAG }}.unitypackage/ObservableCollections.${{ env.GIT_TAG }}.unitypackage
|
||||
asset_name: ObservableCollections.${{ env.GIT_TAG }}.unitypackage
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
cleanup:
|
||||
|
Loading…
x
Reference in New Issue
Block a user