-
Notifications
You must be signed in to change notification settings - Fork 92
75 lines (65 loc) · 2.28 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# MIT License
# Copyright (C) 2020 Tymko Oleg <[email protected]> and contributors
# All rights reserved.
name: Подготовка релиза и публикация в хабе
# Только события создания и изменения релиза
on:
release:
types: [published]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
oscript_version: ['1.9.0']
package_mask: ["gitsync-*.ospx"]
package_exe_mask: ["gitsync.exe"]
steps:
# Загрузка проекта
- name: Актуализация
uses: actions/checkout@v2
# Установка OneScript конкретной версии
- name: Установка OneScript
uses: otymko/[email protected]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
with:
version: ${{ matrix.oscript_version }}
# Установка зависимостей пакета
- name: Установка зависимостей
run: |
opm install opm
opm install
- name: Сборка пакета
run: opm run build
- name: Заливка артифактов
uses: actions/upload-artifact@v2
with:
name: gitsync.ospx.zip
path: ./${{ matrix.package_mask }}
- name: Заливка в релиз
uses: AButler/[email protected]
with:
files: ./${{ matrix.package_mask }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Публикация в hub.oscript.io
shell: bash
run: opm push -f ./${{ matrix.package_mask }} --token ${{ env.TOKEN }} -c stable
env:
TOKEN: ${{ secrets.OSHUB_TOKEN }}
- name: Сборка пакета exe
run: |
opm run pack
opm run make
- name: Заливка артифактов
uses: actions/upload-artifact@v2
with:
name: gitsync.exe.zip
path: ./bin/${{ matrix.package_exe_mask }}
- name: Заливка в релиз exe
uses: AButler/[email protected]
with:
files: ./bin/${{ matrix.package_exe_mask }}
repo-token: ${{ secrets.GITHUB_TOKEN }}