Skip to content

Commit

Permalink
Переезд на autumn-library/workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
sfaqer committed Oct 8, 2024
1 parent d7e106b commit a24dc2b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 84 deletions.
64 changes: 11 additions & 53 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,15 @@
# MIT License
# Copyright (C) 2020 Tymko Oleg <[email protected]> and contributors
# All rights reserved.
name: Публикация релиза

name: Подготовка релиза и публикация в хабе
# Только события создания и изменения релиза
on:
release:
types: [published, edited]

env:
PACKAGE_MASK: decorator-*.ospx
release:
types:
- published
workflow_dispatch:

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
oscript_version: ['1.8.3']

steps:
# Загрузка проекта
- name: Актуализация
uses: actions/checkout@v2

# Установка OneScript конкретной версии
- name: Установка OneScript
uses: otymko/[email protected]
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/[email protected]
# with:
# files: ./${{ env.PACKAGE_MASK }}
# repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Публикация в hub.oscript.io
shell: bash
run: opm push -f ./${{ env.PACKAGE_MASK }} --token ${{ secrets.PUSH_TOKEN }} -c stable
release:
uses: autumn-library/workflows/.github/workflows/release.yml@main
with:
package_mask: "decorator-*.ospx"
secrets:
PUSH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41 changes: 10 additions & 31 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,16 @@
# MIT License
# Copyright (C) 2020 Tymko Oleg <[email protected]> and contributors
# All rights reserved.

name: Тестирование
# Любой пуш и pr в проекте
on: [push, pull_request]

on:
push:
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ${{ matrix.os }}
test:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
oscript_version: ['1.8.3', 'stable', 'dev']

steps:
# Загрузка проекта
- name: Актуализация
uses: actions/checkout@v2

# Установка OneScript конкретной версии
- name: Установка OneScript
uses: otymko/[email protected]
with:
version: ${{ matrix.oscript_version }}

# Установка зависимостей пакета
- name: Установка зависимостей
run: |
opm install opm
opm install --dev
# Задача тестирования, в результате ожидается успешное выполнение
- name: Тестирование
run: oscript ./tasks/test.os
oscript_version: ['dev', 'lts-dev', 'default']
uses: autumn-library/workflows/.github/workflows/test.yml@main
with:
oscript_version: ${{ matrix.oscript_version }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ tests-reports/
.sonar/
.idea/
out/
oscript_modules/
1 change: 1 addition & 0 deletions tasks/oscript.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib.system=../oscript_modules

0 comments on commit a24dc2b

Please sign in to comment.