Skip to content

Commit abadd70

Browse files
authored
Create copilot-setup-steps.yml
1 parent bba1dc9 commit abadd70

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: "OneScript Development Environment Setup"
2+
3+
# Allow testing of the setup steps from your repository's "Actions" tab.
4+
on: workflow_dispatch
5+
6+
jobs:
7+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
8+
copilot-setup-steps:
9+
runs-on: ubuntu-latest
10+
11+
# Set the permissions to the lowest permissions possible needed for your steps.
12+
# Copilot will be given its own token for its operations.
13+
permissions:
14+
# Clone the repository to install dependencies
15+
contents: read
16+
17+
# Setup steps for OneScript development environment
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- run: git config --global core.quotepath false
23+
24+
- name: Вычисление версии OneScript
25+
shell: bash
26+
id: extract_oscript_version
27+
run: |
28+
set -ex
29+
if [ -f packagedef ]; then
30+
extracted_version=$(cat packagedef | grep ".ВерсияСреды(" | sed 's|[^"]*"||' | sed -r 's/".+//' || true)
31+
version="${extracted_version:-stable}"
32+
else
33+
version="stable"
34+
fi
35+
echo "version=$version" >> $GITHUB_OUTPUT
36+
37+
- name: Установка OneScript
38+
uses: otymko/setup-onescript@v1.5
39+
with:
40+
version: ${{ steps.extract_oscript_version.outputs.version }}
41+
42+
- name: Установка зависимостей
43+
run: |
44+
opm install opm
45+
opm install -l --dev

0 commit comments

Comments
 (0)