-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (34 loc) · 1014 Bytes
/
release.yml
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
name: Deploy
on:
create:
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+'
jobs:
build-and-upload:
name: Build and upload
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- build: linux
os: ubuntu-latest
target: x86_64-unknown-linux-musl
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get the release version from the tag
shell: bash
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- name: Install Rust
run: rustup target add ${{ matrix.target }}
- name: Bump version to the tag
run: cargo workspaces version $VERSION --all --no-git-push --no-git-tag --yes
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}