Merge pull request #77 from opencaesar/feat/32-github-actions #10
Workflow file for this run
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: Build and Deploy VSIX File | |
on: | |
push: | |
tags: | |
- "**" | |
workflow_dispatch: | |
jobs: | |
build_vsix_file: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: '18.x' | |
- name: Build VSIX File | |
run: npm run package | |
timeout-minutes: 1 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: vsix-file | |
path: | | |
*.vsix | |
deploy_vsix_file: | |
needs: build_vsix_file | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: '18.x' | |
- uses: actions/download-artifact@v3 | |
with: | |
name: vsix-file | |
- name: Get Release Notes | |
id: get_release_notes | |
run: | | |
npm install | |
node .github/workflows/release_notes.js | |
- name: Get Tag Name | |
id: get_tag_name | |
# Strip the 'refs/tags/' prefix from the ref | |
run: | | |
TAG_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/tags\/v//g') | |
echo "::set-output name=tag_name::$TAG_NAME" | |
- uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
# Name defaults to tag name | |
# Tag defaults to latest tag | |
# Read more here https://github.com/softprops/action-gh-release | |
body: ${{ steps.get_release_notes.outputs.release_notes }} # Use the captured output as the body | |
files: oml-vision-${{ steps.get_tag_name.outputs.tag_name }}.vsix # Find the newest release of OML Vision | |
fail_on_unmatched_files: true | |
draft: false | |
prerelease: false |