mirror of
https://github.com/bia-technologies/yaxunit.git
synced 2024-12-03 08:45:31 +02:00
Merge pull request #358 from bia-technologies/feature/build-release-job
Задание для генерации черновика релиза
This commit is contained in:
commit
e039bff775
73
.github/workflows/build-release.yml
vendored
Normal file
73
.github/workflows/build-release.yml
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
name: Build release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}-release
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
export_to_designer:
|
||||
name: Export to designer xml
|
||||
uses: ./.github/workflows/step-export-xml.yml
|
||||
with:
|
||||
edt_version: 2023.1.2
|
||||
artifact_name: designer-src
|
||||
engine_only: true
|
||||
secrets: inherit
|
||||
|
||||
build_artifacts:
|
||||
runs-on: ubuntu-latest
|
||||
needs: export_to_designer
|
||||
|
||||
steps:
|
||||
- name: install 8.3.21.1895
|
||||
uses: alkoleft/onec-setup-build-env-action@develop
|
||||
with:
|
||||
type: onec
|
||||
onec_version: 8.3.21.1895
|
||||
cache: true
|
||||
env:
|
||||
ONEC_USERNAME: ${{ secrets.ONEC_USERNAME }}
|
||||
ONEC_PASSWORD: ${{ secrets.ONEC_PASSWORD }}
|
||||
timeout-minutes: 10
|
||||
|
||||
- name: download artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: designer-src
|
||||
- name: extract artifacts
|
||||
run: |
|
||||
mkdir export
|
||||
cd export
|
||||
7z x ../export.7z -y
|
||||
|
||||
- name: create IB
|
||||
run: ibcmd infobase create --db-path=file-db
|
||||
timeout-minutes: 5
|
||||
|
||||
- name: import yaxunit
|
||||
run: ibcmd infobase config import --db-path=file-db --extension=YAXUNIT export/yaxunit
|
||||
timeout-minutes: 5
|
||||
|
||||
- name: save yaxunit
|
||||
run: ibcmd infobase config save --db-path=file-db --extension=YAXUNIT YAxUnit-${{ needs.export_to_designer.outputs.yaxunit_version }}.cfe
|
||||
timeout-minutes: 5
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
if: ${{ success() }}
|
||||
with:
|
||||
draft: true
|
||||
files: YAxUnit-*.cfe
|
||||
fail_on_unmatched_files: true
|
||||
generate_release_notes: true
|
||||
append_body: false
|
||||
name: Версия ${{ needs.export_to_designer.outputs.yaxunit_version }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
2
.github/workflows/deploy-documentation.yml
vendored
2
.github/workflows/deploy-documentation.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
||||
name: Deploy to GitHub Pages
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Download bsl doc
|
||||
run: curl -L https://github.com/alkoleft/bsldoc/releases/download/0.1.0/bsldoc-0.1.0.jar --output ./bsldoc.jar && chmod +7 ./bsldoc.jar
|
||||
- name: Generate API documentation
|
||||
|
11
.github/workflows/main-build.yml
vendored
11
.github/workflows/main-build.yml
vendored
@ -4,13 +4,12 @@ on:
|
||||
branches:
|
||||
- feature/**
|
||||
- develop
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
pull_request_target:
|
||||
branches: [ develop ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}-main
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
@ -66,9 +65,3 @@ jobs:
|
||||
v8_version: ${{ matrix.v8_version }}
|
||||
locale: ${{ matrix.locale }}
|
||||
secrets: inherit
|
||||
|
||||
publish_artifacts:
|
||||
name: Publish draft release
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') && success() }}
|
||||
uses: ./.github/workflows/step-publish-artifacts.yml
|
||||
needs: build_artifacts
|
||||
|
4
.github/workflows/sq-pr.yml
vendored
4
.github/workflows/sq-pr.yml
vendored
@ -1,13 +1,13 @@
|
||||
name: Анализ в SonarQube (pull-request)
|
||||
|
||||
on: [pull_request]
|
||||
on: [pull_request_target]
|
||||
|
||||
jobs:
|
||||
SonarScanner:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.event.workflow_run.head_repository.full_name }}
|
||||
ref: ${{ github.event.workflow_run.head_branch }}
|
||||
|
2
.github/workflows/sq.yml
vendored
2
.github/workflows/sq.yml
vendored
@ -10,7 +10,7 @@ jobs:
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.event.repository.full_name
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.event.workflow_run.head_repository.full_name }}
|
||||
ref: ${{ github.event.workflow_run.head_branch }}
|
||||
|
@ -40,7 +40,7 @@ jobs:
|
||||
timeout-minutes: 10
|
||||
|
||||
- name: download artifact
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.src_artifact_name }}
|
||||
|
||||
@ -75,7 +75,7 @@ jobs:
|
||||
timeout-minutes: 5
|
||||
|
||||
- name: upload-artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifact_name }}
|
||||
path: binary\*.*
|
||||
|
24
.github/workflows/step-export-xml.yml
vendored
24
.github/workflows/step-export-xml.yml
vendored
@ -9,6 +9,14 @@ on:
|
||||
artifact_name:
|
||||
type: string
|
||||
required: true
|
||||
|
||||
engine_only:
|
||||
type: boolean
|
||||
required: false
|
||||
default: false
|
||||
outputs:
|
||||
yaxunit_version:
|
||||
value: ${{ jobs.export.outputs.yaxunit_version }}
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}-export
|
||||
@ -17,9 +25,17 @@ concurrency:
|
||||
jobs:
|
||||
export:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
yaxunit_version: ${{ steps.extract_version.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Extract version
|
||||
if: github.event_name == 'push'
|
||||
shell: bash
|
||||
run: echo "version=$(cat ./exts/yaxunit/src/Configuration/Configuration.mdo | grep -oP '(?<=<version>)[\d.]+')" >> $GITHUB_OUTPUT
|
||||
id: extract_version
|
||||
|
||||
- name: install EDT
|
||||
uses: alkoleft/onec-setup-build-env-action@develop
|
||||
with:
|
||||
@ -29,9 +45,10 @@ jobs:
|
||||
env:
|
||||
ONEC_USERNAME: ${{ secrets.ONEC_USERNAME }}
|
||||
ONEC_PASSWORD: ${{ secrets.ONEC_PASSWORD }}
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 30
|
||||
|
||||
- name: convert configuration src
|
||||
if: ${{ !inputs.engine_only }}
|
||||
uses: alkoleft/onec-edtcli-command-action@main
|
||||
with:
|
||||
export: true
|
||||
@ -50,6 +67,7 @@ jobs:
|
||||
timeout-minutes: 10
|
||||
|
||||
- name: convert tests src
|
||||
if: ${{ !inputs.engine_only }}
|
||||
uses: alkoleft/onec-edtcli-command-action@main
|
||||
with:
|
||||
export: true
|
||||
@ -63,7 +81,7 @@ jobs:
|
||||
7za a -t7z ../export.7z ./
|
||||
|
||||
- name: upload-artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifact_name }}
|
||||
path: export.7z
|
||||
|
2
.github/workflows/step-publish-artifacts.yml
vendored
2
.github/workflows/step-publish-artifacts.yml
vendored
@ -21,7 +21,7 @@ jobs:
|
||||
steps:
|
||||
|
||||
- name: download artifact
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifact_name }}
|
||||
path: binary
|
||||
|
6
.github/workflows/step-run-tests-linux.yml
vendored
6
.github/workflows/step-run-tests-linux.yml
vendored
@ -38,7 +38,7 @@ jobs:
|
||||
steps:
|
||||
|
||||
- name: download artifact
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifact_name }}
|
||||
path: binary
|
||||
@ -157,14 +157,14 @@ jobs:
|
||||
run: cat ./output.log
|
||||
|
||||
- name: upload-artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
name: Tests report. Linux ${{ inputs.v8_version }} ${{ inputs.locale }}
|
||||
path: reports/*.*
|
||||
|
||||
- name: Publish Test Report
|
||||
uses: mikepenz/action-junit-report@v3
|
||||
uses: 1CDevFlow/action-onec-junit-report@main
|
||||
if: always()
|
||||
with:
|
||||
job_name: Tests Linux ${{ inputs.v8_version }} ${{ inputs.locale }}
|
||||
|
14
.github/workflows/step-run-tests-windows.yml
vendored
14
.github/workflows/step-run-tests-windows.yml
vendored
@ -37,7 +37,7 @@ jobs:
|
||||
steps:
|
||||
|
||||
- name: download artifact
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifact_name }}
|
||||
path: binary
|
||||
@ -89,11 +89,11 @@ jobs:
|
||||
}
|
||||
}
|
||||
|
||||
- uses: bhowell2/github-substring-action@1.0.2
|
||||
- name: set short_locale
|
||||
id: short_locale
|
||||
with:
|
||||
value: ${{ inputs.locale }}
|
||||
length_from_start: 2
|
||||
run: |
|
||||
Write-Output "substring='${{ inputs.locale }}'.Substring(0, 2)" >> $Env:GITHUB_OUTPUT
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
Start-Process ibsrv.exe -ArgumentList "--data=data"
|
||||
@ -109,13 +109,13 @@ jobs:
|
||||
run: type 1cv8c-output.log
|
||||
|
||||
- name: upload-artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Tests report. Windows ${{ inputs.v8_version }} ${{ inputs.locale }}
|
||||
path: reports/
|
||||
|
||||
- name: Publish Test Report
|
||||
uses: mikepenz/action-junit-report@v3
|
||||
uses: 1CDevFlow/action-onec-junit-report@main
|
||||
with:
|
||||
job_name: Tests Windows ${{ inputs.v8_version }} ${{ inputs.locale }}
|
||||
check_name: Tests report. Windows ${{ inputs.v8_version }} ${{ inputs.locale }}
|
||||
|
42
.github/workflows/step-run-tests.yml
vendored
42
.github/workflows/step-run-tests.yml
vendored
@ -1,42 +0,0 @@
|
||||
name: Run tests on Linux
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
|
||||
matrix:
|
||||
description: 'Matrix parameters'
|
||||
type: string
|
||||
required: true
|
||||
|
||||
artifact_name:
|
||||
type: string
|
||||
required: false
|
||||
default: build-artifacts
|
||||
|
||||
fail_on_failure:
|
||||
type: boolean
|
||||
required: false
|
||||
default: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
checks: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
tests_windows:
|
||||
uses: ./.github/workflows/step-run-tests-windows.yml
|
||||
with:
|
||||
matrix: ${{ inputs.matrix }}
|
||||
secrets: inherit
|
||||
|
||||
tests_ubuntu:
|
||||
uses: ./.github/workflows/step-run-tests-linux.yml
|
||||
with:
|
||||
matrix: ${{ inputs.matrix }}
|
||||
secrets: inherit
|
Loading…
Reference in New Issue
Block a user