Skip to content

[RND-623] initial matchup to MetaEd api-schema plugin (#300) #79

[RND-623] initial matchup to MetaEd api-schema plugin (#300)

[RND-623] initial matchup to MetaEd api-schema plugin (#300) #79

# SPDX-License-Identifier: Apache-2.0
# Licensed to the Ed-Fi Alliance under one or more agreements.
# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
# See the LICENSE and NOTICES files in the project root for more information.
name: On Merge to Main
on:
push:
branches:
- main
env:
API_URL: https://api.github.com/repos/${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.PAT_ATTACH_TO_RELEASE }}
jobs:
create-pre-releases:
name: Create Pre-Releases
runs-on: ubuntu-latest
defaults:
run:
shell: pwsh
working-directory: eng/version
steps:
- name: Checkout the Repo
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
# Need full Git history for calculating the version number
fetch-depth: 0w
- name: Create Meadowlark Pre-Release
run: |
npm install
$version = $(node ./bump.js)
if ($LASTEXITCODE -ne 0) {
throw 'Unable to retrieve version number'
}
"Creating pre-release $version" | Out-Host
$body = @{
tag_name = "$version"
target_commitish = "main"
name = $version
body = ""
draft = $false
prerelease = $true
generate_release_notes = $false
} | ConvertTo-Json
$headers = @{
Accept = "application/vnd.github+json"
Authorization = "Bearer ${{ env.GITHUB_TOKEN }}"
}
Invoke-RestMethod -Method POST -Uri ${{ env.API_URL }}/releases -Body $body -Headers $headers