File tree Expand file tree Collapse file tree 3 files changed +48
-17
lines changed Expand file tree Collapse file tree 3 files changed +48
-17
lines changed Original file line number Diff line number Diff line change 1
- name : Make release
1
+ name : Create release
2
2
3
3
on :
4
4
workflow_dispatch :
11
11
required : true
12
12
13
13
jobs :
14
- build :
14
+ create-release :
15
15
runs-on : ubuntu-latest
16
16
steps :
17
17
- name : Checkout sources
18
18
uses : actions/checkout@v2
19
19
with :
20
- ref : github.event.inputs.sha
20
+ ref : ${{ github.event.inputs.sha }}
21
21
22
22
- name : Install stable toolchain
23
23
uses : actions-rs/toolchain@v1
26
26
toolchain : stable
27
27
override : true
28
28
29
+ - uses : Swatinem/rust-cache@v1
30
+
29
31
- name : Build
30
32
uses : actions-rs/cargo@v1
31
33
with :
32
34
command : build
33
35
args : --release
36
+
37
+ - name : Create release
38
+ id : create_release
39
+ uses : actions/create-release@v1
40
+ env :
41
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
42
+ with :
43
+ tag_name : ${{ github.event.inputs.tag }}
44
+ release_name : ${{ github.event.inputs.tag }}
45
+ body : RSDS release ${{ github.event.inputs.tag }}
46
+ commitish : ${{ github.event.inputs.sha }}
47
+ draft : false
48
+ prerelease : false
49
+
50
+ - name : Upload scheduler binary
51
+ uses : actions/upload-release-asset@v1
52
+ env :
53
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54
+ with :
55
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
56
+ asset_path : ./target/release/rsds-scheduler
57
+ asset_name : rsds-scheduler
58
+ asset_content_type : application/exe
Original file line number Diff line number Diff line change 4
4
# for simplicity we are compiling and testing everything on the Ubuntu environment only.
5
5
# For multi-OS testing see the `cross.yml` workflow.
6
6
7
- on : [push, pull_request]
7
+ on :
8
+ push :
9
+ branches :
10
+ - master
11
+ pull_request :
8
12
9
13
name : Test
10
14
24
28
override : true
25
29
components : rustfmt, clippy
26
30
31
+ - uses : Swatinem/rust-cache@v1
32
+
27
33
- name : Build
28
34
uses : actions-rs/cargo@v1
29
35
with :
34
40
with :
35
41
command : test
36
42
37
- # - name: Lint
38
- # uses: actions-rs/cargo@v1
39
- # with:
40
- # command: clippy
41
- # args: -- -D warnings
42
-
43
- - name : Formatting
44
- uses : actions-rs/cargo@v1
45
- with :
46
- command : fmt
47
- args : --all -- --check
48
-
49
43
- name : Setup Python
50
44
uses : actions/setup-python@v1
51
45
with :
59
53
60
54
- name : Test Python
61
55
run : python -m pytest tests
56
+
57
+ - name : Lint
58
+ uses : actions-rs/cargo@v1
59
+ with :
60
+ command : clippy
61
+ args : -- -D warnings
62
+
63
+ - name : Formatting
64
+ uses : actions-rs/cargo@v1
65
+ with :
66
+ command : fmt
67
+ args : --all -- --check
Original file line number Diff line number Diff line change 11
11
def send_github_event (workflow_name : str , token : str , inputs = ()):
12
12
if inputs is None :
13
13
inputs = {}
14
- payload = {"ref" : "ci " , "inputs" : inputs }
14
+ payload = {"ref" : "master " , "inputs" : inputs }
15
15
headers = {"Authorization" : f"token { token } " ,
16
16
"Accept" : "application/vnd.github.v3+json" }
17
17
response = requests .post (
You can’t perform that action at this time.
0 commit comments