Release #114
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: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
release-tag: | |
description: 'Release Tag' | |
required: true | |
default: 'release/XXX' | |
miranum-cli: | |
description: 'Release miranum-cli app?' | |
type: boolean | |
required: true | |
default: true | |
miranum-core: | |
description: 'Release miranum-core?' | |
type: boolean | |
required: true | |
default: true | |
miranum-create-append-c7-element-templates: | |
description: 'Release miranum-create-append-c7-element-templates' | |
type: boolean | |
required: true | |
default: true | |
miranum-vscode-plugins: | |
description: 'Release all vscode plugins?' | |
type: boolean | |
required: true | |
default: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Setup NodeJS 16 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
- name: Install dependencies | |
run: npm install | |
- name: Lint | |
run: npm run lint | |
- name: Test | |
run: npm run test | |
- name: Build | |
run: npm run build | |
# miranum-cli | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: miranum-cli | |
path: dist/apps/miranum-cli | |
# miranum-core | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: miranum-core | |
path: dist/libs/miranum-core | |
# miranum-create-append-c7-element-templates | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: miranum-create-append-c7-element-templates | |
path: dist/libs/miranum-create-append-c7-element-templates | |
# miranum-extension-pack | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: miranum-extension-pack | |
path: dist/apps/miranum-extension-pack | |
# miranum-config-editor | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: miranum-config-editor | |
path: dist/apps/miranum-config-editor | |
# miranum-console | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: miranum-console | |
path: dist/apps/miranum-console | |
# miranum-jsonforms | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: miranum-jsonforms | |
path: dist/apps/miranum-jsonforms | |
# miranum-modeler | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: miranum-modeler | |
path: dist/apps/miranum-modeler | |
create-release: | |
if: github.event.inputs.release-tag | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create tag | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
github.rest.git.createRef({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
ref: 'refs/tags/${{ github.event.inputs.release-tag }}', | |
sha: context.sha | |
}) | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.event.inputs.release-tag }} | |
release_name: Release ${{ github.event.inputs.release-tag }} | |
draft: false | |
prerelease: false | |
# miranum-cli | |
publish-miranum-cli: | |
if: github.event.inputs.miranum-cli == 'true' | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
- create-release | |
steps: | |
- name: Setup NodeJS 16 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
registry-url: 'https://registry.npmjs.org' | |
- uses: actions/download-artifact@v4 | |
with: | |
name: miranum-cli | |
- name: Publish | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_SECRET }} | |
# miranum-core | |
publish-miranum-core: | |
if: github.event.inputs.miranum-core == 'true' | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
- create-release | |
steps: | |
- name: Setup NodeJS 16 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
registry-url: 'https://registry.npmjs.org' | |
- uses: actions/download-artifact@v4 | |
with: | |
name: miranum-core | |
- name: Publish | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_SECRET }} | |
# miranum-create-append-c7-element-templates | |
publish-miranum-create-append-c7-element-templates: | |
if: github.event.inputs.miranum-create-append-c7-element-templates == 'true' | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
- create-release | |
steps: | |
- name: Setup NodeJS 16 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
registry-url: 'https://registry.npmjs.org' | |
- uses: actions/download-artifact@v4 | |
with: | |
name: miranum-create-append-c7-element-templates | |
- name: Publish | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_SECRET }} | |
# miranum-extension-pack | |
publish-miranum-extension-pack: | |
if: github.event.inputs.miranum-vscode-plugins == 'true' | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
- create-release | |
steps: | |
- name: Setup NodeJS 16 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
registry-url: 'https://registry.npmjs.org' | |
- uses: actions/download-artifact@v4 | |
with: | |
name: miranum-extension-pack | |
- name: Prepare | |
run: npm install && npm install -g @vscode/vsce@latest | |
- name: Publish extension | |
run: vsce publish | |
env: | |
VSCE_PAT: ${{ secrets.VSCE_PUBLISH }} | |
# miranum-config-editor | |
publish-miranum-config-editor: | |
if: github.event.inputs.miranum-vscode-plugins == 'true' | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
- create-release | |
steps: | |
- name: Setup NodeJS 16 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
registry-url: 'https://registry.npmjs.org' | |
- uses: actions/download-artifact@v4 | |
with: | |
name: miranum-config-editor | |
- name: Prepare | |
run: npm install && npm install -g @vscode/vsce@latest | |
- name: Build vsix | |
run: vsce package --out miranum-config-editor.vsix | |
- name: Publish extension | |
run: vsce publish | |
env: | |
VSCE_PAT: ${{ secrets.VSCE_PUBLISH }} | |
# miranum-console | |
publish-miranum-console: | |
if: github.event.inputs.miranum-vscode-plugins == 'true' | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
- create-release | |
steps: | |
- name: Setup NodeJS 16 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
registry-url: 'https://registry.npmjs.org' | |
- uses: actions/download-artifact@v4 | |
with: | |
name: miranum-console | |
- name: Prepare | |
run: npm install && npm install -g @vscode/vsce@latest | |
- name: Build vsix | |
run: vsce package --out miranum-console.vsix | |
- name: Publish extension | |
run: vsce publish | |
env: | |
VSCE_PAT: ${{ secrets.VSCE_PUBLISH }} | |
# miranum-jsonforms | |
publish-miranum-jsonforms: | |
if: github.event.inputs.miranum-vscode-plugins == 'true' | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
- create-release | |
steps: | |
- name: Setup NodeJS 16 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
registry-url: 'https://registry.npmjs.org' | |
- uses: actions/download-artifact@v4 | |
with: | |
name: miranum-jsonforms | |
- name: Prepare | |
run: npm install && npm install -g @vscode/vsce@latest | |
- name: Build vsix | |
run: vsce package --out miranum-jsonforms.vsix | |
- name: Publish extension | |
run: vsce publish | |
env: | |
VSCE_PAT: ${{ secrets.VSCE_PUBLISH }} | |
# miranum-modeler | |
publish-miranum-modeler: | |
if: github.event.inputs.miranum-vscode-plugins == 'true' | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
- create-release | |
steps: | |
- name: Setup NodeJS 16 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
registry-url: 'https://registry.npmjs.org' | |
- uses: actions/download-artifact@v4 | |
with: | |
name: miranum-modeler | |
- name: Prepare | |
run: npm install && npm install -g @vscode/vsce@latest | |
- name: Build vsix | |
run: vsce package --out miranum-modeler.vsix | |
- name: Publish extension | |
run: vsce publish | |
env: | |
VSCE_PAT: ${{ secrets.VSCE_PUBLISH }} |