SHA256
Addidg build-release gitea action, and bumping version in Cargo.toml for test purposes.
This commit is contained in:
@@ -1,20 +1,51 @@
|
|||||||
name: Build Release
|
name: Build Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_dispatch: # Enables manual triggering
|
||||||
branches: [ myaster ]
|
inputs:
|
||||||
pull_request:
|
tag_name:
|
||||||
branches: [ myaster ]
|
description: 'Git tag to build (e.g., v1.0.0)'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-release:
|
||||||
runs-on: rust-trixie
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
# If triggered manually, use the input tag.
|
||||||
|
# If triggered by push, GITHUB_REF_NAME is the tag.
|
||||||
|
ref: ${{ inputs.tag_name || gitea.ref_name }}
|
||||||
|
fetch-depth: 0 # Fetch all history for all tags
|
||||||
|
|
||||||
- name: Build and test
|
- name: Verify Version
|
||||||
run: cargo test --all-features
|
run: |
|
||||||
|
TAG=${{ inputs.tag_name || gitea.ref_name }}
|
||||||
|
CARGO_VERSION=$(grep '^version = ' Cargo.toml | head -1 | cut -d'"' -f2)
|
||||||
|
echo "Building tag: $TAG"
|
||||||
|
echo "Cargo.toml version: $CARGO_VERSION"
|
||||||
|
# Optional: Fail if tag doesn't match Cargo.toml
|
||||||
|
if [ "v$CARGO_VERSION" != "$TAG" ]; then
|
||||||
|
echo "::warning::Tag ($TAG) does not match Cargo.toml version (v$CARGO_VERSION)"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Check formatting
|
- name: Setup Rust toolchain
|
||||||
run: cargo fmt --check
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
|
|
||||||
|
- name: Build Release Binary
|
||||||
|
run: cargo build --release
|
||||||
|
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: nyanit-${{ inputs.tag_name || gitea.ref_name }}
|
||||||
|
path: target/release/
|
||||||
|
|
||||||
|
- name: Upload Release Artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: rust-app-${{ inputs.version }}
|
||||||
|
path: target/release/
|
||||||
|
retention-days: 30
|
||||||
Generated
+1
-1
@@ -287,7 +287,7 @@ checksum = "6aa2c4e539b869820a2b82e1aef6ff40aa85e65decdd5185e83fb4b1249cd00f"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nyanit"
|
name = "nyanit"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ratatui",
|
"ratatui",
|
||||||
"ratatui-textarea",
|
"ratatui-textarea",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "nyanit"
|
name = "nyanit"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
Reference in New Issue
Block a user