fix: github workflow update
This commit is contained in:
@@ -88,29 +88,12 @@ jobs:
|
||||
artifacts: |
|
||||
**/oxker_*.zip
|
||||
**/oxker_*.tar.gz
|
||||
|
||||
##################
|
||||
## Cargo publish #
|
||||
##################
|
||||
|
||||
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@v2
|
||||
with:
|
||||
registry-token: ${{ secrets.CRATES_IO_TOKEN }}
|
||||
|
||||
#########################################
|
||||
## Build images for Dockerhub & ghcr.io #
|
||||
#########################################
|
||||
|
||||
image_build:
|
||||
needs: [cargo_publish]
|
||||
container_image_build:
|
||||
needs: [create_release]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@@ -148,3 +131,31 @@ jobs:
|
||||
--provenance=false --sbom=false \
|
||||
--push \
|
||||
-f containerised/Dockerfile .
|
||||
########################
|
||||
# Publish to crates.io #
|
||||
########################
|
||||
|
||||
# THis could be moved to before a github release is made
|
||||
dry_run_cargo_publish:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [container_image_build]
|
||||
steps:
|
||||
- name: update rust stable
|
||||
run: rustup update stable
|
||||
- uses: actions/checkout@v4
|
||||
- name: Publish Dry Run
|
||||
run: cargo publish --dry-run
|
||||
|
||||
cargo_publish:
|
||||
environment: crates.io
|
||||
runs-on: ubuntu-latest
|
||||
needs: [dry_run_cargo_publish]
|
||||
env:
|
||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
||||
steps:
|
||||
- name: update rust stable
|
||||
run: rustup update stable
|
||||
- uses: actions/checkout@v4
|
||||
- name: Publish
|
||||
run: cargo publish
|
||||
|
||||
|
||||
Reference in New Issue
Block a user