diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index c05bb5a..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- - name: CI - - on: - pull_request: - - jobs: - test: - uses: semantic-release-action/rust/.github/workflows/ci.yml@v5 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 465c97f..fb1804e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,22 +1,37 @@ ---- - name: Release +name: Release - on: - push: - branches: - - main - - next - - next-major - - beta - - alpha - - "[0-9]+.[0-9]+.x" - - "[0-9]+.x" +on: + push: + branches: + - main - jobs: - release: - uses: semantic-release-action/rust/.github/workflows/release-binary.yml@v5 - with: - targets: | - x86_64-unknown-linux-gnu - secrets: - cargo-registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - name: Build + run: cargo build --release + + - name: Run tests + run: cargo test + + - name: Install cargo-release + run: cargo install cargo-release + + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + run: | + git config user.name I-Want-ToBelieve + git config user.email i.want.tobelieve.dev@gmail.com + cargo release --execute diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 120000 index 0000000..bcdfa1a --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1 @@ +/nix/store/5yxsak504bvfrbqkfyavq0y5gpvkm9db-pre-commit-config.json \ No newline at end of file diff --git a/.releaserc b/.releaserc new file mode 100644 index 0000000..bf904e5 --- /dev/null +++ b/.releaserc @@ -0,0 +1,3 @@ +{ + "branches": ["main", "next"] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..64ddfbd --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,19 @@ +{ + // 使用 IntelliSense 了解相关属性。 + // 悬停以查看现有属性的描述。 + // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "start", + "skipFiles": ["/**"], + "preLaunchTask": "build", + "program": "${workspaceFolder}/apps/yakite-daemon/dist/bin/yakite-daemon.js", + "outFiles": [ + "${workspaceFolder}/apps/yakite-daemon/dist/**/*.js" + ] + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..5a0c0f1 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,11 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "type": "shell", + "command": "pnpm -r build", + "problemMatcher": [] + } + ] +} diff --git a/Cargo.toml b/Cargo.toml index 2604017..4878509 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "autohide-tdrop" -version = "1.0.2" +version = "1.0.3" edition = "2021" description = "100% pure rust implementation that can automatically hide terminals or other applications managed by tdrop when they lose focus" authors = ["backtolife2021"]