File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Linux
22
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
411
512env :
613 CARGO_TERM_COLOR : always
3239
3340 deploy :
3441 needs : test
35- if : startsWith( github.ref, 'refs/tags/v')
42+ if : ${{ github.event_name == 'release' }}
3643 runs-on : ubuntu-20.04
3744 strategy :
3845 matrix :
6370
6471 - name : Get the version
6572 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
6775
6876 - name : Deploy
6977 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 11name : macOS
22
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
411
512env :
613 CARGO_TERM_COLOR : always
@@ -30,15 +37,15 @@ jobs:
3037
3138 deploy :
3239 needs : test
33- if : startsWith( github.ref, 'refs/tags/v')
40+ if : ${{ github.event_name == 'release' }}
3441 runs-on : macos-latest
3542 steps :
3643 - uses : actions/checkout@v4
3744
3845 - uses : google-github-actions/setup-gcloud@v2
3946 with :
4047 project_id : ${{ secrets.GCP_PROJECT_ID }}
41- service_account_key : ${{ secrets.GCP_SA_KEY }}
48+ credentials_json : ${{ secrets.GCP_SA_KEY }}
4249
4350 - name : Cargo build
4451 run : cargo build -p tmc --release --verbose
4855
4956 - name : Get the version
5057 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
5260
5361 - name : Deploy
5462 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 11name : Windows
22
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
411
512env :
613 CARGO_TERM_COLOR : always
3340
3441 deploy :
3542 needs : test
36- if : startsWith( github.ref, 'refs/tags/v')
43+ if : ${{ github.event_name == 'release' }}
3744 runs-on : windows-latest
3845 strategy :
3946 matrix :
4451 - uses : google-github-actions/setup-gcloud@v2
4552 with :
4653 project_id : ${{ secrets.GCP_PROJECT_ID }}
47- service_account_key : ${{ secrets.GCP_SA_KEY }}
54+ credentials_json : ${{ secrets.GCP_SA_KEY }}
4855
4956 - name : Enable long paths for git
5057 run : git config --system core.longpaths true # allow long paths from git deps
5865 - name : Get the version
5966 id : get_version
6067 shell : bash
61- run : echo ::set-output name= VERSION:: ${GITHUB_REF/refs\/tags\//}
68+ run : echo " VERSION= ${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
6269
6370 - name : Create msi installer
6471 run : |
You can’t perform that action at this time.
0 commit comments