X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=.github%2Fworkflows%2Fdeploy-packages.yml;h=62bb96e46572845c45f145569a74641ec8b7f49f;hb=e8a53a44d42007fe3b61d430d32ecc64e11e91c3;hp=a08d73cd544cf905298de8dd1debdc778943da62;hpb=801e8b05c20d82af5b783f5ff847bf810e2c42dd;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git diff --git a/.github/workflows/deploy-packages.yml b/.github/workflows/deploy-packages.yml index a08d73c..62bb96e 100644 --- a/.github/workflows/deploy-packages.yml +++ b/.github/workflows/deploy-packages.yml @@ -7,6 +7,10 @@ on: description: 'Branch to deploy' required: true default: 'master' + deploy_to_gpr: + description: 'Deploy packages to Github Packages Registry?' + required: true + default: true deploy_to_myget: description: 'Deploy packages to MyGet?' required: true @@ -23,12 +27,12 @@ jobs: deploy: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: ${{ env.TARGET_BRANCH }} fetch-depth: 0 - - uses: actions/setup-dotnet@v1 + - uses: actions/setup-dotnet@v3 with: dotnet-version: '6.0.102' @@ -51,7 +55,7 @@ jobs: run: | VERSION=$VERSION_PREFIX.$((10000+$(git rev-list --count HEAD))) echo VERSION=$VERSION - echo "::set-output name=version::$VERSION" + echo "version=$VERSION" >> $GITHUB_OUTPUT - name: Build env: @@ -67,6 +71,17 @@ jobs: git tag -fa "v$VERSION" -m "Release $VERSION" git push -f --tags origin refs/tags/"v$VERSION" + - name: Install Github Package Registry Tool + if: github.event.inputs.deploy_to_gpr == 'true' + run: dotnet tool install --global --no-cache gpr + + - name: Deploy NuGet packages to Github Packages Registry + if: github.event.inputs.deploy_to_gpr == 'true' + run: | + gpr push --api-key ${{ secrets.GITHUB_TOKEN }} \ + --repository ${{ github.repository }} \ + --retries 3 Artifacts/*.nupkg + - name: Deploy NuGet packages to MyGet if: github.event.inputs.deploy_to_myget == 'true' env: