-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
608337e
commit 56aa615
Showing
2 changed files
with
88 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Deploy new version | ||
run-name: New deployment for "${{ github.ref_name }}" triggered by ${{ github.actor }} | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Enter the version number" | ||
required: true | ||
default: "latest" | ||
|
||
jobs: | ||
check-version: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Read version from file | ||
run: | | ||
CURRENT_VERSION=$(cargo pkgid --manifest-path fplus-http-server/Cargo.toml | cut -d'#' -f2) | ||
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV | ||
- name: Install cargo-edit | ||
run: cargo install cargo-edit | ||
|
||
- name: Update version | ||
run: cargo set-version ${{ inputs.version }} | ||
|
||
- name: Install Rust | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
|
||
- name: Run cargo check | ||
run: cargo check | ||
|
||
- name: Git config | ||
run: | | ||
git config user.name "${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
# - name: Commit version change | ||
# run: | | ||
# git commit -am "Update version to ${{ inputs.version }}" | ||
# git push origin main | ||
|
||
call-release-workflow: | ||
runs-on: ubuntu-latest | ||
needs: [check-version, update-lock-and-commit] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Check build and push release" | ||
uses: ./.github/workflows/release-new-version.yml | ||
with: | ||
version: ${{ inputs.version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters