forked from opensearch-project/opensearch-api-specification
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace PR workflow with a release draft.
Signed-off-by: dblock <dblock@amazon.com>
- Loading branch information
Showing
8 changed files
with
53 additions
and
41,432 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Build and Publish Spec | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
# branches: | ||
# - main | ||
|
||
jobs: | ||
build: | ||
name: Build and Publish | ||
runs-on: ubuntu-latest | ||
permissions: write-all | ||
|
||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Build | ||
working-directory: ./tools | ||
run: |- | ||
mkdir -p ../build | ||
npm install | ||
export ROOT_PATH=../spec/OpenSearch.openapi.yaml | ||
export OUTPUT_PATH=../build/OpenSearch.latest.yaml | ||
npm run merge -- $ROOT_PATH $OUTPUT_PATH | ||
- name: Extract Branch Name | ||
id: branch | ||
shell: bash | ||
run: echo "name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | ||
|
||
- uses: marvinpinto/action-automatic-releases@v1.2.1 | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: latest-${{ steps.branch.outputs.name }} | ||
prerelease: true | ||
title: OpenSearch OpenAPI Spec (${{ steps.branch.outputs.name }}) | ||
files: | | ||
LICENSE.txt | ||
build/* |
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
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
Oops, something went wrong.