From ae4ce3b549c40cc8bd713f375f030b185179a6e2 Mon Sep 17 00:00:00 2001 From: Jack Wills <32690432+mrjackwills@users.noreply.github.com> Date: Mon, 20 Nov 2023 17:42:19 +0000 Subject: [PATCH] fix: GitHub workflow, cargo publish before create release, --- .../workflows/create_release_and_build.yml | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/.github/workflows/create_release_and_build.yml b/.github/workflows/create_release_and_build.yml index 6acc896..051cbf6 100644 --- a/.github/workflows/create_release_and_build.yml +++ b/.github/workflows/create_release_and_build.yml @@ -6,11 +6,28 @@ on: jobs: + ######################### + ## Publish to crates.io # + ######################### + + cargo_publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: publish to crates.io + uses: katyo/publish-crates@v1 + with: + registry-token: ${{ secrets.CRATES_IO_TOKEN }} + + ################################################# ## Cross platform binary build for release page # ################################################# cross_platform_build: + needs: [cargo_publish] strategy: matrix: platform: @@ -88,28 +105,14 @@ jobs: **/oxker_*.zip **/oxker_*.tar.gz - ######################### - ## Publish to crates.io # - ######################### - - cargo_publish: - needs: [create_release] - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: publish to crates.io - uses: katyo/publish-crates@v1 - with: - registry-token: ${{ secrets.CRATES_IO_TOKEN }} ######################################### ## Build images for Dockerhub & ghcr.io # ######################################### image_build: - needs: [cargo_publish] + needs: [create_release] runs-on: ubuntu-latest steps: - name: Checkout code