Worsening environmental conditions make it increasingly important to produce eco-friendly products. Consumers are aware of this, so they are increasing demand for green products. This study considers a two-level supply chain, comprising just one manufacturer and one retailer, applying Industry 4.0 technologies, and supplying a market that prioritizes green products. Each lot of the manufacturer's single product is shipped to the retailer in several batches of unequal sizes. The batch sizes are determined by an arithmetic progression. The manufacturer's Industry 4.0 investment level influences their cost and greenness level. Demand for the product is influenced not only by the retail price, but also by the level of investment in Industry 4.0 and consequently the product's greenness. The authors construct both a non-coordinated decentralized model and a coordinated model under a cost sharing contract, as well as a centralized model. The analysis illustrates that the supply chain's sustainability in both economic and environmental sustainability terms is increased by coordination.