diff --git a/.Lib9c.StateService/Lib9c.StateService.csproj b/.Lib9c.StateService/Lib9c.StateService.csproj
index f4385886e6..b9ecc6c46f 100644
--- a/.Lib9c.StateService/Lib9c.StateService.csproj
+++ b/.Lib9c.StateService/Lib9c.StateService.csproj
@@ -3,13 +3,16 @@
net6.0
enable
+ Exe
+ true
+ true
enable
-
+
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index dc2b021b94..bc857d5d47 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -47,7 +47,7 @@ jobs:
- name: Install dependencies
run: dotnet restore
- name: Build
- run: dotnet build --no-restore --configuration ${{ matrix.configuration }}
+ run: dotnet build --self-contained=false --no-restore --configuration ${{ matrix.configuration }}
- name: Test
run: dotnet test --no-restore --verbosity normal --configuration ${{ matrix.configuration }}
@@ -69,7 +69,7 @@ jobs:
sed -i -E 's|\[MaybeNullWhen\(false\)] out TValue value|out TValue value|' Lib9c/TableData/Sheet.cs
sed -i -E 's|public bool TryGetValue\(TKey key, out TValue value, bool throwException\)|public bool TryGetValue\(TKey key, out TValue? value, bool throwException\)|' Lib9c/TableData/Sheet.cs
- name: build
- run: dotnet build
+ run: dotnet build --self-contained=false
release:
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 647840aefd..3b7804fece 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -33,3 +33,26 @@ jobs:
fi
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
+ s3-lib9c-stateservice:
+ strategy:
+ matrix:
+ runtime: ["osx-arm64", "linux-arm64", "linux-x64", "win-x64"]
+ name: Publish Lib9c.StateService (${{ matrix.runtime }})
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: true
+ - uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: 6.0.400
+ - name: Publish Lib9c.StateService
+ run: dotnet publish ./.Lib9c.StateService/Lib9c.StateService.csproj -o out -r ${{ matrix.runtime }}
+ - name: Compress the build result
+ run: zip -r ../${{ matrix.runtime }}.zip .
+ working-directory: ./out
+ - name: Upload S3
+ run: aws s3 cp ${{ matrix.runtime }}.zip s3://9c-dx/lib9c-stateservices/${{ github.sha }}/
+ with:
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}