Skip to content

yaml example added to readme #5

yaml example added to readme

yaml example added to readme #5

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16 # Ensure the Node.js version matches your task runtime
- name: Install Dependencies
run: npm install
working-directory: tasks/retire
- name: Patch vss-extension.json
uses: onlyutkarsh/[email protected]
with:
files: vss-extension.json
patch-syntax: = /version => "1.0.${{ github.run_number }}"
fail-if-no-files-patched: true
- name: Patch task.json
uses: onlyutkarsh/[email protected]
with:
files: tasks/retire/task.json
patch-syntax: |
= /version/Major => "1"
= /version/Minor => "0"
= /version/Patch => "${{ github.run_number }}"
fail-if-no-files-patched: true
- name: TfxInstaller
uses: Maetis/[email protected]
- name: Build vsix
run: tfx extension create --manifest-globs vss-extension.json
- name: Create the Release
id: create_release
if: ${{ github.event_name == 'push' }}
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: 1.0.${{ github.run_number }}
release_name: Release 1.0.${{ github.run_number }}
draft: false
- name: Upload vsix
if: ${{ github.event_name == 'push' }}
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./elmahio.retire-extension-1.0.${{ github.run_number }}.vsix
asset_name: elmahio.retire-extension-1.0.${{ github.run_number }}.vsix
asset_content_type: application/zip