Skip to content

Commit

Permalink
build: add experimental release action (#221)
Browse files Browse the repository at this point in the history
Signed-off-by: Yulong Ruan <[email protected]>
  • Loading branch information
ruanyl authored Jun 20, 2023
1 parent 13928d9 commit 34c7157
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/experimental-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: experimental-release

on:
workflow_dispatch:
inputs:
opensearch_dashboards_version:
description: 'Which version of OpenSearch-Dashboards that this build is targeting'
required: false
default: '2.x'

jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
RELEASE_TAG: ${{ github.event.inputs.opensearch_dashboards_version }}-experimental.${{ github.run_id }}

steps:
- run: echo Target OpenSearch-Dashboards version ${{ github.event.inputs.opensearch_dashboards_version }}
- name: Checkout OpenSearch Dashboards
uses: actions/checkout@v2
with:
repository: opensearch-project/OpenSearch-Dashboards
ref: ${{ github.event.inputs.opensearch_dashboards_version }}
path: OpenSearch-Dashboards
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: './OpenSearch-Dashboards/.nvmrc'
registry-url: 'https://registry.npmjs.org'
- name: Install Yarn
# Need to use bash to avoid having a windows/linux specific step
shell: bash
run: |
YARN_VERSION=$(node -p "require('./OpenSearch-Dashboards/package.json').engines.yarn")
echo "Installing yarn@$YARN_VERSION"
npm i -g yarn@$YARN_VERSION
- run: node -v
- run: yarn -v
- name: Checkout ML Commons OpenSearch Dashboards plugin
uses: actions/checkout@v2
with:
path: OpenSearch-Dashboards/plugins/ml-commons-dashboards
- name: Bootstrap plugin/opensearch-dashboards
run: |
cd OpenSearch-Dashboards/plugins/ml-commons-dashboards
yarn osd bootstrap
- name: Run build
run: |
cd OpenSearch-Dashboards/plugins/ml-commons-dashboards
yarn run build
- name: Create Release Tag
run: |
cd OpenSearch-Dashboards/plugins/ml-commons-dashboards
git tag ${{ env.RELEASE_TAG }}
git push origin ${{ env.RELEASE_TAG }}
- name: Release
id: release_step
uses: softprops/action-gh-release@v1
with:
files: OpenSearch-Dashboards/plugins/ml-commons-dashboards/build/*.zip
tag_name: ${{ env.RELEASE_TAG }}
- name: Update Artifact URL
run: |
echo ${{ steps.release_step.outputs.assets }}

0 comments on commit 34c7157

Please sign in to comment.