1 name: "Deploy Packages"
7 description: 'Branch to deploy'
11 description: 'Deploy packages to MyGet?'
15 description: 'Submit changes to Tizen?'
20 TARGET_BRANCH: ${{ github.event.inputs.target }}
24 runs-on: ubuntu-latest
26 - uses: actions/checkout@v2
28 ref: ${{ env.TARGET_BRANCH }}
31 - name: Get Branch Metadata
33 uses: TizenAPI/tizenfx-build-actions/branch-metadata@master
35 ref: ${{ env.TARGET_BRANCH }}
40 VERSION_PREFIX: ${{ steps.metadata.outputs.version-prefix }}
42 VERSION=$VERSION_PREFIX.$((10000+$(git rev-list --count HEAD)))
44 echo "::set-output name=version::$VERSION"
48 VERSION: ${{ steps.version.outputs.version }}
51 ./build.sh pack $VERSION
53 - name: Deploy NuGet packages to MyGet
54 if: github.event.inputs.deploy_to_myget == 'true'
56 NUGET_SOURCE: https://tizen.myget.org/F/dotnet-test/api/v2/package
57 APIKEY: ${{ secrets.MYGET_APIKEY }}
59 dotnet nuget push Artifacts/*.nupkg -k $APIKEY -s $NUGET_SOURCE -t 3000
61 - name: Setup SSH private keys
62 uses: webfactory/ssh-agent@v0.5.2
64 ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
66 - name: Submit changes to Tizen
67 if: github.event.inputs.deploy_to_tizen == 'true'
69 VERSION: ${{ steps.version.outputs.version }}
70 GERRIT_BRANCH: ${{ steps.metadata.outputs.tizen-branch }}
71 GERRIT_URL: ssh://dotnetbuild@review.tizen.org:29418/platform/core/csapi/tizenfx
73 git config --global user.name "TizenAPI-Bot"
74 git config --global user.email "tizenapi@samsung.com"
75 git config core.sshCommand "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
76 git remote add gerrit $GERRIT_URL
77 git fetch gerrit $GERRIT_BRANCH
78 git checkout -t gerrit/$GERRIT_BRANCH
79 git merge --no-edit -s recursive -X theirs origin/$TARGET_BRANCH
80 ./packaging/makespec.sh -r $VERSION -n $VERSION -i $VERSION
82 if [ $(git diff --cached --numstat | wc -l) -eq 0 ]; then
83 echo "## no changes to sync"
86 SUBMIT_TAG=submit/$GERRIT_BRANCH/$(date '+%Y%m%d.%H%M%S')
87 echo SUBMIT_TAG=$SUBMIT_TAG
88 git commit -m "Release $VERSION"
89 git tag -m "Release $VERSION" $SUBMIT_TAG
90 echo git push -f gerrit HEAD:$GERRIT_BRANCH
91 echo git push gerrit refs/tags/$SUBMIT_TAG