@@ -42,33 +42,39 @@ jobs:
4242 steps :
4343 - name : Run Node SE
4444 run : docker run -d --name tonlab-node -e USER_AGREEMENT=yes -p5555:80 tonlabs/local-node
45-
45+
4646 - name : Checkout
4747 uses : actions/checkout@v3
4848 with :
4949 submodules : true
50-
50+
51+ - name : Get Cache Month
52+ id : cache-month
53+ run : |
54+ echo "date=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT
55+ shell : bash
56+
5157 - uses : actions/cache@v3
5258 with :
5359 path : ~/.nuget/packages
54- key : nuget-${{ hashFiles('Directory.Packages.props') }}
60+ key : nuget-${{ steps.cache-month.outputs.date }}-${{ hashFiles('src/ Directory.Packages.props') }}
5561 restore-keys : |
56- nuget-
57-
62+ nuget-${{ steps.cache-month.outputs.date }}-
63+
5864 - name : Setup .NET SDK
5965 uses : actions/setup-dotnet@v3
6066 with :
6167 dotnet-version : |
6268 6.x
6369 7.x
6470 8.x
65-
71+
6672 - name : Restore
6773 run : dotnet restore -v normal
68-
74+
6975 - name : Build
7076 run : dotnet build -c Release --no-restore -v normal -ds -m
71-
77+
7278 - name : Wait for first block of Node SE
7379 timeout-minutes : 5
7480 run : |
@@ -79,21 +85,21 @@ jobs:
7985 fi
8086 sleep 1
8187 done
82-
88+
8389 - name : Test
8490 timeout-minutes : 10
8591 env :
8692 EVERSCALE_NETWORK_ENDPOINTS : http://localhost:5555
8793 run : |
8894 dotnet test --no-build -c Release --logger "console;verbosity=normal" --logger "trx;LogFilePrefix=results" -m
89-
95+
9096 - name : Upload test results trx files
9197 uses : actions/upload-artifact@v3
9298 if : success() || failure()
9399 with :
94100 name : test-results
95101 path : ' **/*.trx'
96-
102+
97103 - name : Pack and publish Release package
98104 if : github.event_name == 'release'
99105 run : |
@@ -103,7 +109,7 @@ jobs:
103109 dotnet pack -v normal -c Release --include-symbols --include-source -p:PackageVersion=$VERSION -p:RunNumber=${{ github.run_number }}
104110 dotnet nuget push "src/**/bin/Release/*.nupkg" --source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --api-key ${{ github.token }} --skip-duplicate
105111 dotnet nuget push "src/**/bin/Release/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key $NUGET_KEY --skip-duplicate
106-
112+
107113 - name : Pack and publish PR package
108114 if : github.event.label.name == 'publish'
109115 run : |
0 commit comments