Release v1.0.0 #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
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: Print pwd | |
run: pwd | |
- name: Publish to crates.io | |
run: | | |
cargo login ${{ secrets.CRATES_IO_TOKEN }} | |
cargo publish --package tdlib-rs-parser --manifest-path ../tdlib-rs-parser/Cargo.toml | |
cargo publish --package tdlib-rs-gen --manifest-path ../tdlib-rs-gen/Cargo.toml | |
cargo publish --package tdlib-rs --manifest-path ../tdlib-rs/Cargo.toml | |
- name: Create release | |
run: gh release create ${{ github.ref_name }} -R $REPO --generate-notes ./*.zip |