From 48861cb48385c700cded06958e341484e1e7e1ef Mon Sep 17 00:00:00 2001 From: Varderes Barsegyan Date: Thu, 8 Aug 2024 10:09:42 -0500 Subject: [PATCH] publish-crates --- .github/workflows/main.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 52156e8..29fa78e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,19 +2,23 @@ name: CI on: push: - branches: ["main"] + branches: ["main", "publish-crates"] pull_request: - branches: ["main"] + branches: ["main", "publish-crates"] jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: actions/setup-go@v3 - with: - go-version: '1.21' - - name: Build - run: cargo build --verbose + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions/setup-go@v3 + with: + go-version: "1.21" + - name: Build + run: cargo build --verbose + - name: Publish to crates.io + run: cargo publish --token ${CRATES_TOKEN} + env: + CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}