fix: create_reelase cargo publish
This commit is contained in:
@@ -6,28 +6,11 @@ on:
|
|||||||
|
|
||||||
jobs:
|
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 binary build for release page #
|
||||||
#################################################
|
#################################################
|
||||||
|
|
||||||
cross_platform_build:
|
cross_platform_build:
|
||||||
needs: [cargo_publish]
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform:
|
platform:
|
||||||
@@ -105,6 +88,21 @@ jobs:
|
|||||||
**/oxker_*.zip
|
**/oxker_*.zip
|
||||||
**/oxker_*.tar.gz
|
**/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@v1
|
||||||
|
with:
|
||||||
|
registry-token: ${{ secrets.CRATES_IO_TOKEN }}
|
||||||
|
|
||||||
|
|
||||||
#########################################
|
#########################################
|
||||||
@@ -112,7 +110,7 @@ jobs:
|
|||||||
#########################################
|
#########################################
|
||||||
|
|
||||||
image_build:
|
image_build:
|
||||||
needs: [create_release]
|
needs: [cargo_publish]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|||||||
+8
-1
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# rust create_release
|
# rust create_release
|
||||||
# v0.3.0
|
# v0.3.1
|
||||||
|
|
||||||
STAR_LINE='****************************************'
|
STAR_LINE='****************************************'
|
||||||
CWD=$(pwd)
|
CWD=$(pwd)
|
||||||
@@ -170,6 +170,12 @@ cargo_test () {
|
|||||||
ask_continue
|
ask_continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Simulate publishing to crates.io
|
||||||
|
cargo_publish () {
|
||||||
|
cargo publish --dry-run
|
||||||
|
ask_continue
|
||||||
|
}
|
||||||
|
|
||||||
# Build all releases that GitHub workflow would
|
# Build all releases that GitHub workflow would
|
||||||
# This will download GB's of docker images
|
# This will download GB's of docker images
|
||||||
cargo_build () {
|
cargo_build () {
|
||||||
@@ -221,6 +227,7 @@ release_flow() {
|
|||||||
|
|
||||||
cargo_test
|
cargo_test
|
||||||
cargo_build
|
cargo_build
|
||||||
|
cargo_publish
|
||||||
|
|
||||||
cd "${CWD}" || error_close "Can't find ${CWD}"
|
cd "${CWD}" || error_close "Can't find ${CWD}"
|
||||||
check_tag
|
check_tag
|
||||||
|
|||||||
Reference in New Issue
Block a user