5
5
branches : [ "master" ]
6
6
pull_request :
7
7
branches : [ "master" ]
8
+ workflow_dispatch :
9
+ inputs :
10
+ ref :
11
+ description : ' The reference (branch/tag/commit) to checkout'
12
+ required : false
13
+ release-type :
14
+ type : choice
15
+ required : false
16
+ default : ' none'
17
+ description : ' Indicates whether we want to make a release and if which one'
18
+ options :
19
+ - release
20
+ - none
8
21
9
22
env :
10
23
CARGO_TERM_COLOR : always
27
40
- target : x86_64-pc-windows-gnu
28
41
os : windows-latest
29
42
steps :
30
- - uses : actions/checkout@v3
43
+ - uses : actions/checkout@v4
44
+ with :
45
+ ref : ${{ inputs.ref || github.ref }}
31
46
- name : Install Rust
32
47
uses : actions-rs/toolchain@v1
33
48
with :
47
62
chmod +x .github/scripts/compile_all_targets_java_new.sh
48
63
.github/scripts/compile_all_targets_java_new.sh ${{ matrix.target }}
49
64
shell : bash
50
-
51
65
- name : Upload dynamic libs
52
66
uses : actions/upload-artifact@v3
53
67
with :
@@ -72,13 +86,14 @@ jobs:
72
86
os : windows-latest
73
87
runs-on : ${{ matrix.os }}
74
88
steps :
75
- - uses : actions/checkout@v3
89
+ - uses : actions/checkout@v4
90
+ with :
91
+ ref : ${{ inputs.ref || github.ref }}
76
92
- name : Download artifacts
77
93
uses : actions/download-artifact@v3
78
94
with :
79
95
name : ${{ matrix.target }}
80
96
path : bindings/java/java_code/src/main/resources/${{ matrix.target }}
81
-
82
97
- name : Set up JDK
83
98
uses : actions/setup-java@v3
84
99
with :
@@ -95,13 +110,14 @@ jobs:
95
110
name : Merge Artifacts
96
111
needs : [build, test]
97
112
runs-on : ubuntu-latest
113
+ if : ${{ inputs.release-type != 'none' }}
98
114
steps :
99
- - uses : actions/checkout@v3
100
-
115
+ - uses : actions/checkout@v4
116
+ with :
117
+ ref : ${{ inputs.ref || github.ref }}
101
118
- name : Download all artifacts
102
119
uses : actions/download-artifact@v3
103
120
with :
104
121
path : bindings/java/java_code/src/main/resources
105
-
106
122
- name : List merged artifacts
107
123
run : ls -R bindings/java/java_code
0 commit comments