Skip to content

Commit

Permalink
fix: GitHub workflow, cargo publish before create release,
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjackwills committed Nov 20, 2023
1 parent 1702414 commit ae4ce3b
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/create_release_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ae4ce3b

Please sign in to comment.