-
Notifications
You must be signed in to change notification settings - Fork 10
40 lines (38 loc) · 1.2 KB
/
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
# This job automatically creates and publishes a new version on crates.io and github whenever a tag starting with `v`
on:
push:
tags:
- 'v*'
name: Create Release
jobs:
build:
name: Create Releases
runs-on: ubuntu-latest
steps:
#get the code and the correct rust version
- uses: actions/checkout@v2
- uses: "actions-rs/toolchain@v1"
with:
toolchain: stable
#Release to crates.io first as that has the highest chance of failing
- name: Login to crates.io
run: cargo login ${{ secrets.CRATES_TOKEN }}
- name: Release the derive crate
run: cd tealr_derive && cargo publish
- name: Backoff a bit before releasing tealr
uses: jakejarvis/wait-action@master
with:
time: '20s'
- name: Release the main crate
run: cargo publish
#Now, release to github as well.
- name: Create Release on github
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false