ci test
authorWonYoung Choi <wy80.choi@samsung.com>
Mon, 17 May 2021 01:39:53 +0000 (10:39 +0900)
committerWonYoung Choi <wy80.choi@samsung.com>
Mon, 17 May 2021 01:39:53 +0000 (10:39 +0900)
.github/workflows/deploy-packages.yml

index 304faf5..7c3653a 100644 (file)
@@ -7,6 +7,10 @@ on:
         description: 'Target Branch to Deploy'
         required: true
         default: 'master'
+      deploy_to_myget:
+        description: 'If true, NuGet packages will be deployed to MyGet'
+        required: true
+        default: true
 
   # schedule:
   # - cron: "0 16 * * *"
@@ -38,6 +42,21 @@ jobs:
         echo VERSION=$VERSION
         echo "::set-output name=version::$VERSION"
 
+    - name: Build
+      env:
+        VERSION: ${{ steps.version.outputs.version }}
+      run: |
+        ./build.sh full
+        ./build.sh pack $VERSION
+
+    - name: Deploy NuGet packages to MyGet
+      if: github.event.inputs.deploy_to_myget == 'true'
+      env:
+        NUGET_SOURCE: https://tizen.myget.org/F/dotnet-test/api/v2/package
+        APIKEY: ${{ secrets.MYGET_APIKEY }}
+      run: |
+        dotnet nuget push Artifacts/*.nupkg -k $APIKEY -s $NUGET_SOURCE -t 3000
+
     - name: Test
       run: |
         echo "${{ steps.version.outputs.version }}"