diff --git a/github/workflows/actions.yaml b/github/workflows/actions.yaml new file mode 100644 index 0000000..e21693b --- /dev/null +++ b/github/workflows/actions.yaml @@ -0,0 +1,23 @@ +name: Build C++ + +on: + push: + branches: "**" + pull_request: + branches: [ main ] + +jobs: + install: + runs-on: ubuntu-latest + steps: + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y -f build-essential g++ cmake + build: + needs: install + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build project + run: g++ -std=c++17 main.cpp \ No newline at end of file diff --git a/main.cpp b/main.cpp index 690cf17..837eb0a 100644 --- a/main.cpp +++ b/main.cpp @@ -24,6 +24,11 @@ int main(){ pick = rand() % VALIDATION.size(); cout << "What are you listening to?\n"; input = get_input_in_lowercase(); + if (input == "nothing") + { + exit(0); + } + cout << VALIDATION[pick] << "! Let's listen to more\n"; do{