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 }}
26 - uses: actions/checkout@v2
28 ref: ${{ env.TARGET_BRANCH }}
31 - uses: actions/setup-dotnet@v1
33 dotnet-version: '6.0.102'
37 git config --global user.name "TizenAPI-Bot"
38 git config --global user.email "tizenapi@samsung.com"
39 git config core.sshCommand "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
41 - name: Get Branch Metadata
43 uses: TizenAPI/tizenfx-build-actions/branch-metadata@master
45 ref: ${{ env.TARGET_BRANCH }}
50 VERSION_PREFIX: ${{ steps.metadata.outputs.version-prefix }}
52 VERSION=$VERSION_PREFIX.$((10000+$(git rev-list --count HEAD)))
54 echo "::set-output name=version::$VERSION"
58 VERSION: ${{ steps.version.outputs.version }}
61 ./build.sh pack $VERSION
65 VERSION: ${{ steps.version.outputs.version }}
67 git tag -fa "v$VERSION" -m "Release $VERSION"
68 git push -f --tags origin refs/tags/"v$VERSION"
70 - name: Deploy NuGet packages to MyGet
71 if: github.event.inputs.deploy_to_myget == 'true'
73 NUGET_SOURCE: https://tizen.myget.org/F/dotnet/api/v2/package
74 APIKEY: ${{ secrets.MYGET_APIKEY }}
76 dotnet nuget push Artifacts/*.nupkg -k $APIKEY -s $NUGET_SOURCE -t 3000
78 - name: Setup SSH private keys
79 uses: webfactory/ssh-agent@v0.7.0
81 ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
83 - name: Submit changes to Tizen
84 if: github.event.inputs.deploy_to_tizen == 'true'
86 VERSION: ${{ steps.version.outputs.version }}
87 GERRIT_BRANCH: ${{ steps.metadata.outputs.tizen-branch }}
88 GERRIT_URL: ssh://dotnetbuild@review.tizen.org:29418/platform/core/csapi/tizenfx
90 if [ -z "$GERRIT_BRANCH" ]; then
91 echo "## no specified tizen branch"
94 git remote add gerrit $GERRIT_URL
95 git fetch gerrit $GERRIT_BRANCH
96 git checkout -t gerrit/$GERRIT_BRANCH
97 git merge --no-edit -s recursive -X theirs origin/$TARGET_BRANCH
98 ./packaging/makespec.sh -r $VERSION -n $VERSION -i $VERSION
100 if [ $(git diff --cached --numstat | wc -l) -eq 0 ]; then
101 echo "## no changes to sync"
104 SUBMIT_TAG=submit/$GERRIT_BRANCH/$(date '+%Y%m%d.%H%M%S')
105 echo SUBMIT_TAG=$SUBMIT_TAG
106 git commit -m "Release $VERSION"
107 git tag -m "Release $VERSION" $SUBMIT_TAG
108 git push -f gerrit HEAD:$GERRIT_BRANCH
109 git push gerrit refs/tags/$SUBMIT_TAG
110 echo "::notice title=Submit Request TAG::$SUBMIT_TAG"