Git Product home page Git Product logo

update-api-version-action's Introduction

Update Shopify API Version Action

This GitHub Action automatically updates the API version in all shopify.extension.toml files within a repository to the latest API version based on the current date. The action can be configured to either commit changes directly or create a pull request.

Features

  • Automatically determines the latest Shopify API version based on the current date.
  • Updates all shopify.extension.toml files within the repository.
  • Includes unit tests to ensure the action works correctly.

Example configuration

name: Update Shopify API Version

on:
  schedule:
    - cron: '0 0 2 * *' # Runs at midnight on the second day of each month
  workflow_dispatch: # Allows manual triggering from the UI

jobs:
  update-version:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Setup Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 18
          cache: 'npm'

      - name: Install Shopify CLI
        run: npm install -g @shopify/cli@latest

      - name: Update Shopify API version
        uses: davejcameron/update-api-version-action@main
        with:
          config: 'shopify.app.production.toml'  # Optional
        env:
          SHOPIFY_CLI_PARTNERS_TOKEN: ${{ secrets.SHOPIFY_CLI_PARTNERS_TOKEN }}
          SHOPIFY_API_KEY: ${{ secrets.SHOPIFY_API_KEY }} # App context to use

      - name: Create Pull Request
        uses: peter-evans/create-pull-request@v6
        with:
          commit-message: Update api version to latest 
          title: Update Shopify extensions API version
          branch: bump-shopify-api-version

update-api-version-action's People

Contributors

davejcameron avatar

Stargazers

Gil Greenberg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.