Draft GitHub Release #41
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: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Create Draft Release | |
uses: actions/github-script@0.9.0 | |
with: | |
script: | | |
const today = new Date(); | |
const yyyy = today.getFullYear(); | |
const mm = String(today.getMonth() + 1).padStart(2, '0'); | |
const api_version = yyyy + '-' + mm; | |
const notes = `Updates the Mobile Buy SDK for Android 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: `X.X.X [${api_version}]`, | |
body: notes, | |
tag_name: 'x.x.x', | |
target_commitish: 'main', | |
draft: true, | |
prerelease: false, | |
}) |