Skip to content

Draft GitHub Release #42

Draft GitHub Release

Draft GitHub Release #42

Workflow file for this run

name: Draft GitHub Release
on:
workflow_dispatch:
jobs:
build:
runs-on: macOS-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Get SDK version
id: sdk-version
run: |
SDK_VERSION="$(./Scripts/get_sdk_version)"
echo "SDK_VERSION=$SDK_VERSION" >> $GITHUB_ENV
- name: Get API Version
id: api-version
run: |
API_VERSION="$(./Scripts/get_api_version)"
echo "API_VERSION=$API_VERSION" >> $GITHUB_ENV
- name: Create a draft release
uses: actions/github-script@v7
with:
script: |
const api_version = process.env.API_VERSION
const sdk_version = process.env.SDK_VERSION
const notes = `Updates the Mobile Buy SDK for iOS with support for the \`${api_version}\` version of the Shopify Storefront API.\n\nFor more details about the changes, please see the [release notes](https://shopify.dev/api/release-notes/${api_version}#graphql-storefront-api-changes).`
github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
name: `${sdk_version} [${api_version}]`,
body: notes,
tag_name: sdk_version,
target_commitish: 'main',
draft: true,
prerelease: false,
})