diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f5f97ad --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: Release + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]' + +jobs: + check: + name: Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Cargo check + uses: actions-rs/cargo@v1 + with: + command: check + + release: + name: Cargo publish + runs-on: ubuntu-latest + needs: check + steps: + - uses: actions/checkout@v1 + - run: cargo login ${CRATES_IO_TOKEN} + env: + CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} + - run: cargo publish diff --git a/Cargo.lock b/Cargo.lock index 3c3c7d5..da0b9db 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -466,7 +466,7 @@ dependencies = [ [[package]] name = "gobang" -version = "0.1.0" +version = "0.1.0-alpha.0" dependencies = [ "anyhow", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 41e2383..afdb009 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gobang" -version = "0.1.0" +version = "0.1.0-alpha.0" authors = ["Takayuki Maeda "] edition = "2018" diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs index c26115c..c70ad9b 100644 --- a/src/handlers/mod.rs +++ b/src/handlers/mod.rs @@ -64,6 +64,7 @@ pub async fn handle_app(key: Key, app: &mut App) -> anyhow::Result<()> { }, Key::Enter => match app.focus_type { FocusType::Connections => { + app.selected_database.select(Some(0)); create_connection::handler(key, app).await?; database_list::handler(key, app).await?; } diff --git a/src/user_config.rs b/src/user_config.rs index 7d1103a..c868653 100644 --- a/src/user_config.rs +++ b/src/user_config.rs @@ -1,5 +1,4 @@ use serde::Deserialize; - use std::fs::File; use std::io::{BufReader, Read};