Skip to content

Merge pull request #52 from tom-englert/dev/issue#50 #158

Merge pull request #52 from tom-englert/dev/issue#50

Merge pull request #52 from tom-englert/dev/issue#50 #158

Workflow file for this run

name: NuGetMonitor
on:
push:
branches:
- main
- 'feature/**'
pull_request:
env:
version: '1.6.${{ github.run_number }}'
repoUrl: ${{ github.server_url }}/${{ github.repository }}
vsixPath: ${{ github.workspace }}/NuGetMonitor/src/NuGetMonitor/bin/release/net48/win/NuGetMonitor.vsix
publishManifestPath: NuGetMonitor/publish-manifest.json
jobs:
build:
name: 🛠️ Build
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: NuGet restore
run: nuget restore NuGetMonitor.sln
- name: Build VSIX
run: msbuild NuGetMonitor.sln /t:Rebuild /p:Configuration=Release
env:
DeployExtension: False
Version: ${{ env.version }}
- name: Publish Build Artifacts
uses: actions/upload-artifact@v4
with:
name: NuGetMonitor
path: |
**/*.vsix
publish-manifest.json
readme.md
release:
if: github.ref_name == 'main'
name: 🔖 Tag & Release
needs: build
runs-on: windows-latest
environment: Release
steps:
- name: Download artifact
uses: actions/download-artifact@v4
- name: Tag release
id: tag_release
uses: mathieudutour/github-tag-action@v6.2
with:
custom_tag: '${{ env.version }}'
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_release.outputs.new_tag }}
name: ${{ steps.tag_release.outputs.new_tag }}
body: ${{ steps.tag_release.outputs.changelog }}
artifacts: "**/*.vsix"
skipIfReleaseExists: true
publishMarketplace:
if: github.ref_name == 'main'
name: 🚀 Publish to Marketplace
needs: build
runs-on: windows-latest
environment: Release
steps:
- name: Download artifact
uses: actions/download-artifact@v4
- name: Publish to Marketplace
uses: cezarypiatek/VsixPublisherAction@1.1
with:
extension-file: ${{ env.vsixPath }}
publish-manifest-file: ${{ env.publishManifestPath }}
personal-access-code: ${{ secrets.VS_PUBLISHER_ACCESS_TOKEN }}
publishOpenVSIXGallery:
if: github.ref_name == 'main'
name: 🚀 Publish to Open VSIX Gallery
needs: build
runs-on: windows-latest
environment: Release
steps:
- name: Download artifact
uses: actions/download-artifact@v4
- name: Publish to Open VSIX Gallery
run: |
curl -L 'https://www.vsixgallery.com/api/upload?repo=${{ env.repoUrl }}&issuetracker=${{ env.repoUrl }}/issues' -F 'file=@"${{ env.vsixPath }}"'