forked from Samsung/TizenFX
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Samsung:master' into master
- Loading branch information
Showing
3,453 changed files
with
329,839 additions
and
77,290 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
push: | ||
branches: | ||
- master | ||
- DevelNUI | ||
- API* | ||
|
||
paths: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
pull_request: | ||
branches: | ||
- master | ||
- DevelNUI | ||
- API* | ||
|
||
jobs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
pull_request_target: | ||
branches: | ||
- master | ||
- DevelNUI | ||
- API* | ||
|
||
jobs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: "Deploy Documents for Tizen Docs" | ||
|
||
on: | ||
schedule: | ||
- cron: "0 17 * * *" | ||
workflow_dispatch: | ||
|
||
env: | ||
DOCFX_FILE: docfx_tizen_docs.json | ||
DEPLOY_BRANCH: tizen-docs-pages | ||
CACHE_NAME: docfx-tizen-docs-pages-site | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: [self-hosted, linux, x64] | ||
container: | ||
image: tizendotnet/tizenfx-build-worker:2.0 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: TizenAPI/TizenFX-Docs | ||
|
||
- name: Checkout TizenFX sources | ||
run: | | ||
./build.sh clone | ||
- name: Cache DocFX output | ||
id: cache-site | ||
uses: actions/cache@v2 | ||
with: | ||
path: _site | ||
key: ${{ env.CACHE_NAME }}-${{ hashFiles('repos/commits') }} | ||
|
||
- name: Build Documents | ||
if: steps.cache-site.outputs.cache-hit != 'true' | ||
run: | | ||
./build.sh restore | ||
./build.sh build | ||
- name: Archive Artifacts | ||
run: | | ||
tar cfz site.tar.gz _site/ | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: documents | ||
path: site.tar.gz | ||
|
||
deploy: | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: documents | ||
|
||
- name: Extract Artifacts | ||
run: | | ||
tar xfz site.tar.gz | ||
- name: Deploy GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./_site | ||
publish_branch: ${{ env.DEPLOY_BRANCH }} | ||
user_name: 'TizenAPI-Bot' | ||
user_email: '[email protected]' | ||
full_commit_message: 'Update documents' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: "Deploy Documents" | ||
|
||
on: | ||
schedule: | ||
- cron: "0 16 * * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: [self-hosted, linux, x64] | ||
container: | ||
image: tizendotnet/tizenfx-build-worker:2.0 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: TizenAPI/TizenFX-Docs | ||
|
||
- name: Checkout TizenFX sources | ||
run: | | ||
./build.sh clone | ||
- name: Cache DocFX output | ||
id: cache-site | ||
uses: actions/cache@v2 | ||
with: | ||
path: _site | ||
key: docfx-gh-pages-site-${{ hashFiles('repos/commits') }} | ||
|
||
- name: Build Documents | ||
if: steps.cache-site.outputs.cache-hit != 'true' | ||
run: | | ||
./build.sh restore | ||
./build.sh build | ||
./build.sh index | ||
- name: Archive Artifacts | ||
run: | | ||
tar cfz site.tar.gz _site/ | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: documents | ||
path: site.tar.gz | ||
|
||
deploy: | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: documents | ||
|
||
- name: Extract Artifacts | ||
run: | | ||
tar xfz site.tar.gz | ||
- name: Deploy GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./_site | ||
publish_branch: gh-pages | ||
user_name: 'TizenAPI-Bot' | ||
user_email: '[email protected]' | ||
full_commit_message: 'Update documents' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
name: "Deploy Packages" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
target: | ||
description: 'Branch to deploy' | ||
required: true | ||
default: 'master' | ||
deploy_to_myget: | ||
description: 'Deploy packages to MyGet?' | ||
required: true | ||
default: true | ||
deploy_to_tizen: | ||
description: 'Submit changes to Tizen?' | ||
required: true | ||
default: true | ||
|
||
env: | ||
TARGET_BRANCH: ${{ github.event.inputs.target }} | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ env.TARGET_BRANCH }} | ||
fetch-depth: 0 | ||
|
||
- name: Git Config | ||
run: | | ||
git config --global user.name "TizenAPI-Bot" | ||
git config --global user.email "[email protected]" | ||
git config core.sshCommand "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" | ||
- name: Get Branch Metadata | ||
id: metadata | ||
uses: TizenAPI/tizenfx-build-actions/branch-metadata@master | ||
with: | ||
ref: ${{ env.TARGET_BRANCH }} | ||
|
||
- name: Get Version | ||
id: version | ||
env: | ||
VERSION_PREFIX: ${{ steps.metadata.outputs.version-prefix }} | ||
run: | | ||
VERSION=$VERSION_PREFIX.$((10000+$(git rev-list --count HEAD))) | ||
echo VERSION=$VERSION | ||
echo "::set-output name=version::$VERSION" | ||
- name: Build | ||
env: | ||
VERSION: ${{ steps.version.outputs.version }} | ||
run: | | ||
./build.sh full | ||
./build.sh pack $VERSION | ||
- name: Tag Version | ||
env: | ||
VERSION: ${{ steps.version.outputs.version }} | ||
run: | | ||
git tag -fa "v$VERSION" -m "Release $VERSION" | ||
git push -f --tags origin refs/tags/"v$VERSION" | ||
- name: Deploy NuGet packages to MyGet | ||
if: github.event.inputs.deploy_to_myget == 'true' | ||
env: | ||
NUGET_SOURCE: https://tizen.myget.org/F/dotnet/api/v2/package | ||
APIKEY: ${{ secrets.MYGET_APIKEY }} | ||
run: | | ||
dotnet nuget push Artifacts/*.nupkg -k $APIKEY -s $NUGET_SOURCE -t 3000 | ||
- name: Setup SSH private keys | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
|
||
- name: Submit changes to Tizen | ||
if: github.event.inputs.deploy_to_tizen == 'true' | ||
env: | ||
VERSION: ${{ steps.version.outputs.version }} | ||
GERRIT_BRANCH: ${{ steps.metadata.outputs.tizen-branch }} | ||
GERRIT_URL: ssh://[email protected]:29418/platform/core/csapi/tizenfx | ||
run: | | ||
if [ -z "$GERRIT_BRANCH" ]; then | ||
echo "## no specified tizen branch" | ||
exit 0 | ||
fi | ||
git remote add gerrit $GERRIT_URL | ||
git fetch gerrit $GERRIT_BRANCH | ||
git checkout -t gerrit/$GERRIT_BRANCH | ||
git merge --no-edit -s recursive -X theirs origin/$TARGET_BRANCH | ||
./packaging/makespec.sh -r $VERSION -n $VERSION -i $VERSION | ||
git add packaging/ | ||
if [ $(git diff --cached --numstat | wc -l) -eq 0 ]; then | ||
echo "## no changes to sync" | ||
exit 0 | ||
fi | ||
SUBMIT_TAG=submit/$GERRIT_BRANCH/$(date '+%Y%m%d.%H%M%S') | ||
echo SUBMIT_TAG=$SUBMIT_TAG | ||
git commit -m "Release $VERSION" | ||
git tag -m "Release $VERSION" $SUBMIT_TAG | ||
git push -f gerrit HEAD:$GERRIT_BRANCH | ||
git push gerrit refs/tags/$SUBMIT_TAG | ||
echo "::notice title=Submit Request TAG::$SUBMIT_TAG" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: "Nightly Release" | ||
|
||
|
||
on: | ||
schedule: | ||
- cron: '0 15 * * *' | ||
workflow_dispatch: | ||
|
||
env: | ||
TARGET_BRANCHES: 'master API9' | ||
|
||
jobs: | ||
nightly: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Find Branches to Release | ||
id: find-targets | ||
run: | | ||
TARGETS="" | ||
# find branches without the version tag | ||
for x in $TARGET_BRANCHES; do | ||
tags=$(git tag --contains origin/$x) | ||
if [[ ! $tags =~ v[0-9]+\.[0-9]+\.[0-9]+ ]]; then | ||
TARGETS="${TARGETS} $x" | ||
fi | ||
done | ||
echo "::set-output name=targets::${TARGETS}" | ||
- name: Trigger Release | ||
uses: actions/github-script@v4 | ||
env: | ||
TARGETS: ${{ steps.find-targets.outputs.targets }} | ||
WORKFLOW_NAME: 'Deploy Packages' | ||
with: | ||
github-token: ${{ secrets.TIZENAPI_GITHUB_TOKEN }} | ||
script: | | ||
var resp = await github.request('GET /repos/{owner}/{repo}/actions/workflows', { | ||
owner: context.repo.owner, | ||
repo: context.repo.repo | ||
}) | ||
if (resp.status != 200) throw new Error('Failed to get workflow list.') | ||
var workflow = resp.data.workflows.find(w => { | ||
return w['name'] === process.env.WORKFLOW_NAME | ||
}) | ||
if (!workflow) throw new Error('Unable to find the workflow.') | ||
var targets = process.env.TARGETS.trim().split(' ') | ||
targets.forEach(async target => { | ||
var dispatchResp = await github.request('POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches', { | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
workflow_id: workflow.id, | ||
ref: 'master', | ||
inputs: { target, deploy_to_myget: 'true', deploy_to_tizen: 'true' } | ||
}) | ||
console.log(`Event dispatch for ${target} : ${dispatchResp.status}`) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.