1 name: "Deploy Packages"
7 description: 'Branch to deploy'
11 description: 'Deploy packages to Github Packages Registry?'
15 description: 'Deploy packages to MyGet?'
19 description: 'Submit changes to Tizen?'
24 TARGET_BRANCH: ${{ github.event.inputs.target }}
30 - uses: actions/checkout@v3
32 ref: ${{ env.TARGET_BRANCH }}
35 - uses: actions/setup-dotnet@v3
37 dotnet-version: '6.0.102'
41 git config --global user.name "TizenAPI-Bot"
42 git config --global user.email "tizenapi@samsung.com"
43 git config core.sshCommand "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
45 - name: Get Branch Metadata
47 uses: TizenAPI/tizenfx-build-actions/branch-metadata@master
49 ref: ${{ env.TARGET_BRANCH }}
54 VERSION_PREFIX: ${{ steps.metadata.outputs.version-prefix }}
56 VERSION=$VERSION_PREFIX.$((10000+$(git rev-list --count HEAD)))
58 echo "version=$VERSION" >> $GITHUB_OUTPUT
62 VERSION: ${{ steps.version.outputs.version }}
65 ./build.sh pack $VERSION
69 VERSION: ${{ steps.version.outputs.version }}
71 git tag -fa "v$VERSION" -m "Release $VERSION"
72 git push -f --tags origin refs/tags/"v$VERSION"
74 - name: Deploy NuGet packages to Github Packages Registry
75 if: github.event.inputs.deploy_to_gpr == 'true'
77 PACKAGES_SOURCE: https://nuget.pkg.github.com/Samsung/index.json
78 APIKEY: ${{ secrets.GITHUB_TOKEN }}
80 dotnet nuget push Artifacts/*.nupkg -k $APIKEY -s $PACKAGES_SOURCE -t 3000
82 - name: Deploy NuGet packages to MyGet
83 if: github.event.inputs.deploy_to_myget == 'true'
85 NUGET_SOURCE: https://tizen.myget.org/F/dotnet/api/v2/package
86 APIKEY: ${{ secrets.MYGET_APIKEY }}
88 dotnet nuget push Artifacts/*.nupkg -k $APIKEY -s $NUGET_SOURCE -t 3000
90 - name: Setup SSH private keys
91 uses: webfactory/ssh-agent@v0.7.0
93 ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
95 - name: Submit changes to Tizen
96 if: github.event.inputs.deploy_to_tizen == 'true'
98 VERSION: ${{ steps.version.outputs.version }}
99 GERRIT_BRANCH: ${{ steps.metadata.outputs.tizen-branch }}
100 GERRIT_URL: ssh://dotnetbuild@review.tizen.org:29418/platform/core/csapi/tizenfx
102 if [ -z "$GERRIT_BRANCH" ]; then
103 echo "## no specified tizen branch"
106 git remote add gerrit $GERRIT_URL
107 git fetch gerrit $GERRIT_BRANCH
108 git checkout -t gerrit/$GERRIT_BRANCH
109 git merge --no-edit -s recursive -X theirs origin/$TARGET_BRANCH
110 ./packaging/makespec.sh -r $VERSION -n $VERSION -i $VERSION
112 if [ $(git diff --cached --numstat | wc -l) -eq 0 ]; then
113 echo "## no changes to sync"
116 SUBMIT_TAG=submit/$GERRIT_BRANCH/$(date '+%Y%m%d.%H%M%S')
117 echo SUBMIT_TAG=$SUBMIT_TAG
118 git commit -m "Release $VERSION"
119 git tag -m "Release $VERSION" $SUBMIT_TAG
120 git push -f gerrit HEAD:$GERRIT_BRANCH
121 git push gerrit refs/tags/$SUBMIT_TAG
122 echo "::notice title=Submit Request TAG::$SUBMIT_TAG"