Fix error in path in workflow #49
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: CodeNav | |
on: | |
push: | |
branches: | |
- main | |
- 'feature/**' | |
env: | |
version: '8.9.${{ github.run_number }}' | |
repoUrl: ${{ github.server_url }}/${{ github.repository }} | |
jobs: | |
build: | |
name: Build | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Update Assembly Version | |
uses: dannevesdantas/set-version-assemblyinfo@v.1.0.0 | |
with: | |
version: ${{ env.version }} | |
- name: Update Vsix Version (VS2019) | |
uses: cezarypiatek/VsixVersionAction@1.2 | |
with: | |
version: ${{ env.version }} | |
vsix-manifest-file: 'CodeNav.VS2019\source.extension.vsixmanifest' | |
- name: Update Vsix Version (VS2022) | |
uses: cezarypiatek/VsixVersionAction@1.2 | |
with: | |
version: ${{ env.version }} | |
vsix-manifest-file: 'CodeNav.VS2022\source.extension.vsixmanifest' | |
- name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v2 | |
- name: NuGet restore | |
run: nuget restore CodeNav.sln -ConfigFile nuget.config | |
- name: Build VSIX | |
run: msbuild CodeNav.sln /t:Rebuild /p:Configuration=Release | |
env: | |
DeployExtension: False | |
- name: Publish Build Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: CodeNav | |
path: | | |
**\*.vsix | |
publish-manifest.*.json | |
readme.md | |
release: | |
name: 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.1 | |
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" | |
- name: Publish to Marketplace - VS2019 | |
uses: cezarypiatek/VsixPublisherAction@1.1 | |
with: | |
extension-file: CodeNav/CodeNav.VS2019/bin/release/CodeNav.VS2019.vsix | |
publish-manifest-file: CodeNav/publish-manifest.VS2019.json | |
personal-access-code: ${{ secrets.VS_PUBLISHER_ACCESS_TOKEN }} | |
- name: Publish to Marketplace - VS2022 | |
uses: cezarypiatek/VsixPublisherAction@1.1 | |
with: | |
extension-file: CodeNav/CodeNav.VS2022/bin/release/CodeNav.VS2022.vsix | |
publish-manifest-file: CodeNav/publish-manifest.VS2022.json | |
personal-access-code: ${{ secrets.VS_PUBLISHER_ACCESS_TOKEN }} | |
- name: Publish to Open VSIX Gallery - VS2019 | |
run: | | |
curl -L 'https://www.vsixgallery.com/api/upload?repo=${{ env.repoUrl }}&issuetracker=${{ env.repoUrl }}/issues' -F 'file=@"CodeNav/CodeNav.VS2019/bin/release/CodeNav.VS2019.vsix"' | |
- name: Publish to Open VSIX Gallery - VS2022 | |
run: | | |
curl -L 'https://www.vsixgallery.com/api/upload?repo=${{ env.repoUrl }}&issuetracker=${{ env.repoUrl }}/issues' -F 'file=@"CodeNav/CodeNav.VS2022/bin/release/CodeNav.VS2022.vsix"' |