-
Notifications
You must be signed in to change notification settings - Fork 10
38 lines (33 loc) · 1.01 KB
/
cd.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
name: CD
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
jobs:
build-tdlib:
uses: ./.github/workflows/build-tdlib.yml
release_github:
runs-on: ubuntu-latest
needs: build-tdlib
steps:
- name: Download artifacts
run: gh run download ${{ github.run_id }} -R $REPO
- name: Zip artifacts
run: find * -maxdepth 0 -type d -execdir mv '{}' tdlib \; -execdir zip -r -m -6 '{}.zip' 'tdlib' \;
- name: Create release
run: gh release create ${{ github.ref_name }} -R $REPO --generate-notes ./*.zip
release_crates:
runs-on: ubuntu-latest
needs: release_github
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Publish to crates.io
run: |
cargo login ${{ secrets.CRATES_IO_TOKEN }}
cargo publish --package tdlib-rs-parser
cargo publish --package tdlib-rs-gen
cargo publish --no-verify --package tdlib-rs