-
-
Notifications
You must be signed in to change notification settings - Fork 386
65 lines (61 loc) · 2.06 KB
/
deploy_julia.yml
File metadata and controls
65 lines (61 loc) · 2.06 KB
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
name: Bump Julia Version
on:
workflow_dispatch:
inputs:
version:
description: New Version
default: ""
required: true
publish:
description: Make Public(true or false)
default: "false"
required: true
jobs:
BumpJuliaVersion:
runs-on: windows-2019
steps:
# check users permission
- name: "Check Permissions"
uses: "lannonbr/repo-permission-check-action@2.0.0"
with:
permission: "admin"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Install Dependencies
- name: Clone Repository
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Install Julia
uses: julia-actions/setup-julia@v1
with:
version: 1.3.1
- name: Print Inputs
run: |
echo ${{ github.event.inputs.version }}
echo ${{ github.event.inputs.publish }}
- name: Change Julia Files
run: |
cd $env:GITHUB_WORKSPACE\julia_package\brainflow\src
(gc .\brainflow_url.jl) -replace '[0-9]+.[0-9]+.[0-9]+', $env:VERSION | Out-File -encoding ASCII brainflow_url.jl
cd $env:GITHUB_WORKSPACE\julia_package\brainflow
(gc .\Artifacts.toml) -replace '[0-9]+.[0-9]+.[0-9]+', $env:VERSION | Out-File -encoding ASCII Artifacts.toml
(gc .\Project.toml) -replace 'version = "[0-9]+.[0-9]+.[0-9]+"', "version = `"$env:VERSION`"" | Out-File -encoding ASCII Project.toml
julia generate_brainflow_artifact.jl
git diff $env:GITHUB_WORKSPACE\julia_package > $env:GITHUB_WORKSPACE\julia.patch
env:
VERSION: ${{ github.event.inputs.version }}
- name: Upload Julia Diff
uses: actions/upload-artifact@v4
with:
name: julia.patch
path: julia.patch
- name: Commit Changes
if: github.event.inputs.publish == 'true'
uses: EndBug/add-and-commit@v6
with:
add: '-u julia_package'
author_name: Andrey1994
author_email: andrey@brainflow.org
message: 'Bump Julia Version'
token: ${{ secrets.GITHUB_TOKEN }}