Merge pull request #2 from elmahio/imgbot #10
This file contains hidden or 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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Patch vss-extension.json | |
uses: onlyutkarsh/[email protected] | |
with: | |
files: vss-extension.json | |
patch-syntax: = /version => "4.0.${{ github.run_number }}" | |
fail-if-no-files-patched: true | |
- name: Patch task.json | |
uses: onlyutkarsh/[email protected] | |
with: | |
files: ElmahIoUploadSourceMap/task.json | |
patch-syntax: | | |
= /version/Major => "4" | |
= /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: 4.0.${{ github.run_number }} | |
release_name: Release 4.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.elmah-io-upload-source-map-4.0.${{ github.run_number }}.vsix | |
asset_name: elmahio.elmah-io-upload-source-map-4.0.${{ github.run_number }}.vsix | |
asset_content_type: application/zip |