The expenses are a debit so cost of goods sold are a debit. If you use an item from the inventory you should credit your inventory account (asset) and debit your cost of goods sold.
A different approach would be to debit your cost of goods sold when you purchase something and credit cash or accounts payable. At the year end, you will make two adjustments. The first adjustment is the opening stock and the second adjustment is the closing stock. So cost of sales will need to be debited for the opening stock and credited for the closing stock. The other entry will be the inventory line in the balance sheet.