This commit is contained in:
Jerome Laban 2022-03-25 10:42:26 -04:00
Родитель a2a1250037
Коммит f82f2265d1
3 изменённых файлов: 176 добавлений и 0 удалений

98
.github/workflows/ci.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,98 @@
name: CI
on:
push:
branches:
- main
- release/**
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
- release/**
jobs:
build:
name: Build
runs-on: macos-latest
env:
UnoCheck_Version: '1.1.0-dev.22'
UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/d14571a546b55f58e51e392c04cf098168d6fe2d/manifests/uno.ui-preview.manifest.json'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET Core v6
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.200'
- name: Setup GitVersion
uses: gittools/actions/gitversion/setup@v0.9.9
with:
versionSpec: '5.x'
- name: GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.9
with:
useConfigFile: true
configFilePath: gitversion.yml
# Required until .NET 6 installs properly using UseDotnet
# using preview builds
- name: Install .NET 6 Mobile workloads
shell: pwsh
run: |
dotnet tool update --global uno.check --version $UnoCheck_Version --add-source https://api.nuget.org/v3/index.json
uno-check --ci --non-interactive --fix --skip androidsdk --skip gtk3 --skip xcode --skip vswin --skip vsmac --manifest $UnoCheck_Manifest
- name: Build - CI
run: |
$adjustedPackageVersion="${{ steps.gitversion.outputs.semVer }}".ToLower();
dotnet pack -c Release -p:PackageVersion=$adjustedPackageVersion -p:Version=${{ steps.gitversion.outputs.assemblySemVer }} -o src\
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: NuGet
path: .\artifacts
publish:
name: Publish
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) }}
runs-on: windows-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: NuGet
path: artifacts
- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: Setup SignClient
run: |
dotnet tool install --tool-path build SignClient
# Temporarily disabled for certs updates
#- name: SignClient
# run: |
# build\SignClient sign -i artifacts\*.nupkg -c build\SignClient.json -r "${{ secrets.SIGN_CLIENT_USER }}" -s "${{ secrets.SIGN_CLIENT_SECRET }}" -n "Uno.Check" -d "Uno.Check" -u "https://github.com/unoplatform/uno.check"
- name: NuGet Push
run: |
dotnet nuget push artifacts\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_ORG_API_KEY }}

21
.github/workflows/commitsar.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,21 @@
name: Commitsar
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
- release/**
jobs:
commitsar:
name: Commitsar
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Commitsar
uses: docker://aevea/commitsar:0.16.0

57
gitversion.yml Normal file
Просмотреть файл

@ -0,0 +1,57 @@
assembly-versioning-scheme: MajorMinorPatch
mode: Mainline
branches:
main:
mode: ContinuousDeployment
regex: main
tag: dev
increment: Minor
is-source-branch-for: ['beta', 'stable']
pull-request:
regex: ^(pull|pull\-requests|pr)[/-]
mode: ContinuousDeployment
tag: 'PullRequest'
tag-number-pattern: '[/-](?<number>\d+)[-/]'
increment: Inherit
beta:
mode: ContinuousDeployment
regex: ^release/beta/.*
tag: beta
increment: none
source-branches: ['main']
stable:
regex: ^release/stable/.*
tag: ''
increment: Patch
source-branches: ['main','beta']
is-mainline: true
dev:
mode: ContinuousDeployment
regex: ^dev/.*?/(.*?)
tag: dev.{BranchName}
source-branches: ['main', 'stable', 'projects', 'feature']
increment: none
projects:
tag: proj-{BranchName}
regex: ^projects/(.*?)
source-branches: ['main']
increment: none
feature:
tag: feature.{BranchName}
regex: ^feature/(.*?)
source-branches: ['main']
increment: none
release:
# disable default release branch
regex: ignore
ignore:
sha: []