File tree Expand file tree Collapse file tree 3 files changed +34
-11
lines changed Expand file tree Collapse file tree 3 files changed +34
-11
lines changed Original file line number Diff line number Diff line change 1
1
name : Linux
2
2
3
- on : push
3
+ on :
4
+ push :
5
+ branches : [main, "v[0-9]+.[0-9]+.[0-9]+"]
6
+ pull_request :
7
+ branches : [main, "v[0-9]+.[0-9]+.[0-9]+"]
8
+ release :
9
+ types :
10
+ - created
4
11
5
12
env :
6
13
CARGO_TERM_COLOR : always
32
39
33
40
deploy :
34
41
needs : test
35
- if : startsWith( github.ref, 'refs/tags/v')
42
+ if : ${{ github.event_name == 'release' }}
36
43
runs-on : ubuntu-20.04
37
44
strategy :
38
45
matrix :
63
70
64
71
- name : Get the version
65
72
id : get_version
66
- run : echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
73
+ shell : bash
74
+ run : echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
67
75
68
76
- name : Deploy
69
77
run : gsutil cp target/${{ matrix.target }}/release/tmc gs://${{ secrets.GCP_BUCKET }}/tmc-cli-rust/tmc-cli-rust-${{ matrix.target }}-${{ steps.get_version.outputs.VERSION }}
Original file line number Diff line number Diff line change 1
1
name : macOS
2
2
3
- on : push
3
+ on :
4
+ push :
5
+ branches : [main, "v[0-9]+.[0-9]+.[0-9]+"]
6
+ pull_request :
7
+ branches : [main, "v[0-9]+.[0-9]+.[0-9]+"]
8
+ release :
9
+ types :
10
+ - created
4
11
5
12
env :
6
13
CARGO_TERM_COLOR : always
@@ -30,15 +37,15 @@ jobs:
30
37
31
38
deploy :
32
39
needs : test
33
- if : startsWith( github.ref, 'refs/tags/v')
40
+ if : ${{ github.event_name == 'release' }}
34
41
runs-on : macos-latest
35
42
steps :
36
43
- uses : actions/checkout@v4
37
44
38
45
- uses : google-github-actions/setup-gcloud@v2
39
46
with :
40
47
project_id : ${{ secrets.GCP_PROJECT_ID }}
41
- service_account_key : ${{ secrets.GCP_SA_KEY }}
48
+ credentials_json : ${{ secrets.GCP_SA_KEY }}
42
49
43
50
- name : Cargo build
44
51
run : cargo build -p tmc --release --verbose
48
55
49
56
- name : Get the version
50
57
id : get_version
51
- run : echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
58
+ shell : bash
59
+ run : echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
52
60
53
61
- name : Deploy
54
62
run : gsutil cp target/release/tmc gs://${{ secrets.GCP_BUCKET }}/tmc-cli-rust/tmc-cli-rust-x86_64-apple-darwin-${{ steps.get_version.outputs.VERSION }}
Original file line number Diff line number Diff line change 1
1
name : Windows
2
2
3
- on : push
3
+ on :
4
+ push :
5
+ branches : [main, "v[0-9]+.[0-9]+.[0-9]+"]
6
+ pull_request :
7
+ branches : [main, "v[0-9]+.[0-9]+.[0-9]+"]
8
+ release :
9
+ types :
10
+ - created
4
11
5
12
env :
6
13
CARGO_TERM_COLOR : always
33
40
34
41
deploy :
35
42
needs : test
36
- if : startsWith( github.ref, 'refs/tags/v')
43
+ if : ${{ github.event_name == 'release' }}
37
44
runs-on : windows-latest
38
45
strategy :
39
46
matrix :
44
51
- uses : google-github-actions/setup-gcloud@v2
45
52
with :
46
53
project_id : ${{ secrets.GCP_PROJECT_ID }}
47
- service_account_key : ${{ secrets.GCP_SA_KEY }}
54
+ credentials_json : ${{ secrets.GCP_SA_KEY }}
48
55
49
56
- name : Enable long paths for git
50
57
run : git config --system core.longpaths true # allow long paths from git deps
58
65
- name : Get the version
59
66
id : get_version
60
67
shell : bash
61
- run : echo ::set-output name= VERSION:: ${GITHUB_REF/refs\/tags\//}
68
+ run : echo " VERSION= ${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
62
69
63
70
- name : Create msi installer
64
71
run : |
You can’t perform that action at this time.
0 commit comments