From aff1104b08653547992c6908bbe1f4a1334ac0c0 Mon Sep 17 00:00:00 2001 From: meloalright Date: Sun, 22 Oct 2023 23:46:40 +0800 Subject: [PATCH] + Tag ci --- .github/workflows/CI.yml | 2 +- .github/workflows/Tag.yml | 35 +++++++++++++++++++++++++++++++++++ three_body_e2021/Cargo.toml | 3 ++- 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/Tag.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index db5524c..717af20 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,4 +1,4 @@ -name: Rust +name: CI on: push: diff --git a/.github/workflows/Tag.yml b/.github/workflows/Tag.yml new file mode 100644 index 0000000..c244654 --- /dev/null +++ b/.github/workflows/Tag.yml @@ -0,0 +1,35 @@ +name: Tag + +on: + push: + tags: + - '*.*.*' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: "Compress Source Code" + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: "./" + files: "three_body_e2021" + outPath: "${{ runner.temp }}/3body-lang.tar.gz" + + - name: "Release Source Code" + uses: pragmatrix/release-action@exp + with: + owner: rustq + repo: 3body-lang + tag: ${{ env.RELEASE_VERSION }} + allowUpdates: true + replacesArtifacts: true + artifacts: "${{ runner.temp }}/3body-lang.tar.gz" + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true diff --git a/three_body_e2021/Cargo.toml b/three_body_e2021/Cargo.toml index db4d66f..c832515 100644 --- a/three_body_e2021/Cargo.toml +++ b/three_body_e2021/Cargo.toml @@ -14,10 +14,11 @@ rand = { version = "0.7.3" } reqwest = { version = "0.11", features = ["blocking"] } [[bin]] -name = "repl" +name = "3body" path = "src/bin/main.rs" required-features = ["repl"] [features] +default = ["repl"] repl = ["rustyline"] wasm = [] \ No newline at end of file