Add Toolwindow #25
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: MjmlVisualizer | |
on: | |
push: | |
branches: | |
- main | |
- 'feature/**' | |
pull_request: | |
env: | |
version: '1.1.${{ github.run_number }}' | |
repoUrl: ${{ github.server_url }}/${{ github.repository }} | |
vsixPath: ${{ github.workspace }}/MjmlVisualizer/src/MjmlVisualizer.Vsix/bin/release/MjmlVisualizer.vsix | |
jobs: | |
build: | |
name: Build | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Update Assembly Version | |
uses: dannevesdantas/[email protected] | |
with: | |
version: ${{ env.version }} | |
- name: Update Vsix Version | |
uses: cezarypiatek/[email protected] | |
with: | |
version: ${{ env.version }} | |
vsix-manifest-file: 'src/MjmlVisualizer.Vsix/source.extension.vsixmanifest' | |
- name: Replace Placeholders | |
uses: cschleiden/replace-tokens@v1 | |
with: | |
files: '["**/MjmlRepository.cs"]' | |
env: | |
MJML_USERNAME: ${{ secrets.MJML_USERNAME }} | |
MJML_PASSWORD: ${{ secrets.MJML_PASSWORD }} | |
- name: Setup MSBuild | |
uses: microsoft/[email protected] | |
- name: NuGet restore | |
run: nuget restore MjmlVisualizer.sln | |
- name: Build VSIX | |
run: msbuild MjmlVisualizer.sln /t:Rebuild /p:Configuration=Release | |
env: | |
DeployExtension: False | |
- name: Publish Build Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: MjmlVisualizer | |
path: | | |
src/MjmlVisualizer/bin/Release/MjmlVisualizer.dll | |
src/MjmlVisualizer.Vsix/bin/Release/MjmlVisualizer.vsix | |
src/MjmlVisualizer.Vsix/publish-manifest.json | |
readme.md | |
release: | |
if: github.ref_name == 'main' | |
name: Release | |
needs: build | |
runs-on: windows-latest | |
environment: Release | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
- name: Tag release | |
id: tag_release | |
uses: mathieudutour/[email protected] | |
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,**/MjmlVisualizer.dll" | |
skipIfReleaseExists: true | |
- name: Publish to Marketplace | |
uses: cezarypiatek/[email protected] | |
with: | |
extension-file: ${{ env.vsixPath }} | |
publish-manifest-file: MjmlVisualizer/src/MjmlVisualizer.Vsix/publish-manifest.json | |
personal-access-code: ${{ secrets.VS_PUBLISHER_ACCESS_TOKEN }} | |
- 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 }}"' |