From a66cda266eda732d6331993459c8255ff3b14c26 Mon Sep 17 00:00:00 2001 From: Aviram Hassan Date: Tue, 2 Apr 2024 09:20:14 +0300 Subject: [PATCH] Add release CI, bump action versions to avoid deprecations (#131) * bump checkout to avoid deprecation warnings * add release CI --- .github/workflows/build.yml | 8 ++++---- .github/workflows/release.yml | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dbea0b0..0ee9cca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install Rust uses: actions-rs/toolchain@v1 with: @@ -89,7 +89,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install Rust uses: actions-rs/toolchain@v1 with: @@ -131,7 +131,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install Rust uses: actions-rs/toolchain@v1 with: @@ -151,7 +151,7 @@ jobs: env: DOCS_RS: 1 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 with: profile: minimal diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f4fa179 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,24 @@ +name: Release +on: + workflow_dispatch: + push: + tags: + - v[0-9]+.[0-9]+.[0-9]+ + +jobs: + crates_io: + name: Publish crates to Crates.io + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: Publish crates to Crates.io + uses: katyo/publish-crates@v2 + with: + registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} \ No newline at end of file