From 92d6cb7d10eb3f8389db416857761c947be66b65 Mon Sep 17 00:00:00 2001 From: ArKuznetsov Date: Thu, 29 Oct 2020 20:26:45 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=B0=D0=B2=D1=82=D0=BE=D0=BF=D1=83=D0=B1?= =?UTF-8?q?=D0=BB=D0=B8=D0=BA=D0=B0=D1=86=D0=B8=D1=8F=20=D1=80=D0=B5=D0=BB?= =?UTF-8?q?=D0=B8=D0=B7=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 59 +++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..223773e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,59 @@ +# MIT License +# Copyright (C) 2020 Tymko Oleg and contributors +# All rights reserved. + +name: Подготовка релиза и публикация в хабе +# Только события создания и изменения релиза +on: + release: + types: [published, edited] + +env: + PACKAGE_MASK: yabr-*.ospx + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + oscript_version: ['1.4.0'] + + steps: + # Загрузка проекта + - name: Актуализация + uses: actions/checkout@v2 + + # Установка OneScript конкретной версии + - name: Установка OneScript + uses: otymko/setup-onescript@v1.0 + with: + version: ${{ matrix.oscript_version }} + + # Установка зависимостей пакета + - name: Установка зависимостей + run: | + opm install opm + opm install + + - name: Сборка пакета + run: opm build + + - name: Заливка артифактов + uses: actions/upload-artifact@v2 + with: + name: package.zip + path: ./${{ env.PACKAGE_MASK }} + + - name: Заливка в релиз + uses: AButler/upload-release-assets@v1.0 + with: + files: ./${{ env.PACKAGE_MASK }} + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Публикация в hub.oscript.io + shell: bash + run: opm push -f ./${{ env.PACKAGE_MASK }} --token ${{ env.TOKEN }} -c stable + env: + TOKEN: ${{ secrets.OSHUB_TOKEN }} \ No newline at end of file