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 }}
33 git config --global user.name "TizenAPI-Bot"
34 git config --global user.email "tizenapi@samsung.com"
35 git config core.sshCommand "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
37 - name: Get Branch Metadata
39 uses: TizenAPI/tizenfx-build-actions/branch-metadata@master
41 ref: ${{ env.TARGET_BRANCH }}
46 VERSION_PREFIX: ${{ steps.metadata.outputs.version-prefix }}
48 VERSION=$VERSION_PREFIX.$((10000+$(git rev-list --count HEAD)))
50 echo "::set-output name=version::$VERSION"
54 VERSION: ${{ steps.version.outputs.version }}
57 ./build.sh pack $VERSION
61 VERSION: ${{ steps.version.outputs.version }}
63 git tag -fa "v$VERSION" -m "Release $VERSION"
64 git push -f --tags origin refs/tags/"v$VERSION"
66 - name: Deploy NuGet packages to MyGet
67 if: github.event.inputs.deploy_to_myget == 'true'
69 NUGET_SOURCE: https://tizen.myget.org/F/dotnet/api/v2/package
70 APIKEY: ${{ secrets.MYGET_APIKEY }}
72 dotnet nuget push Artifacts/*.nupkg -k $APIKEY -s $NUGET_SOURCE -t 3000
74 - name: Setup SSH private keys
75 uses: webfactory/ssh-agent@v0.5.2
77 ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
79 - name: Submit changes to Tizen
80 if: github.event.inputs.deploy_to_tizen == 'true'
82 VERSION: ${{ steps.version.outputs.version }}
83 GERRIT_BRANCH: ${{ steps.metadata.outputs.tizen-branch }}
84 GERRIT_URL: ssh://dotnetbuild@review.tizen.org:29418/platform/core/csapi/tizenfx
86 git remote add gerrit $GERRIT_URL
87 git fetch gerrit $GERRIT_BRANCH
88 git checkout -t gerrit/$GERRIT_BRANCH
89 git merge --no-edit -s recursive -X theirs origin/$TARGET_BRANCH
90 ./packaging/makespec.sh -r $VERSION -n $VERSION -i $VERSION
92 if [ $(git diff --cached --numstat | wc -l) -eq 0 ]; then
93 echo "## no changes to sync"
96 SUBMIT_TAG=submit/$GERRIT_BRANCH/$(date '+%Y%m%d.%H%M%S')
97 echo SUBMIT_TAG=$SUBMIT_TAG
98 git commit -m "Release $VERSION"
99 git tag -m "Release $VERSION" $SUBMIT_TAG
100 git push -f gerrit HEAD:$GERRIT_BRANCH
101 git push gerrit refs/tags/$SUBMIT_TAG