-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (50 loc) · 1.77 KB
/
deploy-cli.yml
File metadata and controls
50 lines (50 loc) · 1.77 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
name: Deploy to Github
on:
push:
branches: [main]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
rust: [stable, nightly]
steps:
- uses: hecrj/setup-rust-action@v2
with:
rust-version: ${{ matrix.rust }}
- uses: actions/checkout@master
- name: Run tests
run: cargo test --verbose
env:
Client_ID: ${{secrets.ClientID}}
Client_Secret: ${{secrets.ClientSecret}}
# - name: Build CLI with cli feature
# run: cargo build --release --features cli
# - name: Create tar.gz
# run: |
# tar -czvf cli.tar.gz -C target/release/ cli
# - name: Extract version from CLI
# id: extract_version
# run: |
# echo "::set-output name=version::$(cargo run --features cli -- version | sed -n 's/.*\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/p')"
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
# with:
# tag_name: v${{ steps.extract_version.outputs.version }}
# release_name: CLI v${{ steps.extract_version.outputs.version }}
# draft: false
# prerelease: false
# - name: Upload Release Asset
# id: upload-release-asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./cli.tar.gz
# asset_name: cli.tar.gz
# asset_content_type: application/gzip