Draft GitHub Release #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Draft GitHub Release | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: macOS-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- 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@0.9.0 | |
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.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, | |
}) |