diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index cbfb4fb..044982a 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -13,6 +13,21 @@ env: jobs: build-tdlib: uses: ./.github/workflows/build-tdlib.yml + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Print pwd + run: pwd + - name: Print ls + run: ls + - 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 --package tdlib-rs + release: runs-on: ubuntu-latest needs: build-tdlib @@ -23,9 +38,3 @@ jobs: 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 - - name: Publish to crates.io - run: | - cargo login ${{ secrets.CRATES_IO_TOKEN }} - cargo publish --package tdlib-rs-gen --manifest-path tdlib-rs-gen/Cargo.toml - cargo publish --package tdlib-rs-parser --manifest-path tdlib-rs-parser/Cargo.toml - cargo publish --package tdlib-rs --manifest-path tdlib-rs/Cargo.toml diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index de9edc7..791bdda 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -6,7 +6,7 @@ on: pull_request: branches: [ main ] release: - types: [ created, published ] + types: [ published ] env: GH_TOKEN: ${{ github.token }} diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index f8bf5dd..fe8ef78 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -6,7 +6,7 @@ on: pull_request: branches: [ main ] release: - types: [ created, published ] + types: [ published ] env: GH_TOKEN: ${{ github.token }} diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 7cc9ce1..e818edb 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -6,7 +6,7 @@ on: pull_request: branches: [ main ] release: - types: [ created, published ] + types: [ published ] env: GH_TOKEN: ${{ github.token }} diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..f91f195 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,10 @@ +```bash +git add --all +git commit -sm "Release v1.0.0" +git push origin main + +git tag -l | xargs git tag -d +git fetch --tags +git tag v1.0.0 +git push origin v1.0.0 +``` diff --git a/tdlib-rs/Cargo.toml b/tdlib-rs/Cargo.toml index 3a76d39..e2be1ba 100644 --- a/tdlib-rs/Cargo.toml +++ b/tdlib-rs/Cargo.toml @@ -12,6 +12,7 @@ repository = "https://github.com/FedericoBruzzone/tdlib-rs" documentation = "https://docs.rs/tdlib-rs" keywords = ["telegram", "tdlib", "tdjson", "tdlib-rs", "telegram-api"] description = "Rust wrapper around the Telegram Database Library." +readme = "README.md" [package.metadata.docs.rs] features = ["docs", "bots-only-api"]