Yes, you are liable to pay as you have shown the willingness to leave the company on 3rd July 2017 and the company accepted your resignation.
So technically you left before the one year period and you will not get the salary as well as you will also have to pay the joining bonus.When you received this joining bonus from your employer, this was considered as your income, was considered in your annual income and post TDS this amount was given to you.
Now, when this amount will be taken back as a recovery amount during your full and final (F&F) settlement from the employer, your annual income would decrease by this amount. Any applicable TDS on the F&F amount would be deducted by your employer.
Finally, when you will file your income tax return during its relevant assessment year, the whole income excluding the joining bonus and including any other income would be considered for the tax calculations.
The computed tax including cess would be adjusted with total TDS deducted during the year including the TDS of the joining bonus amount. Thus, the remaining amount whether positive (tax payable) or negative (tax refund) or zero (neither tax payable nor tax receivables) would be the final outcome.
Case 2: Within Two Consecutive Financial Years
In case the financial year changes, the joining bonus was considered as income in the previous year and thus counted in the ITR as income. The tax payable and TDS deducted including the TDS of the joining bonus amount, will be considered in that year.
Reference: labour law