Fix action version in workflow #46
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/[email protected] | |
with: | |
version: ${{ env.version }} | |
- name: Update Vsix Version (VS2019) | |
uses: cezarypiatek/[email protected] | |
with: | |
version: ${{ env.version }} | |
vsix-manifest-file: 'CodeNav.VS2019\source.extension.vsixmanifest' | |
- name: Update Vsix Version (VS2022) | |
uses: cezarypiatek/[email protected] | |
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/[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" | |
- name: Publish to Marketplace - VS2019 | |
uses: cezarypiatek/[email protected] | |
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/[email protected] | |
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 | |
uses: leandro-hermes/[email protected] | |
with: | |
host: 'www.vsixgallery.com' | |
path: '/api/upload?repo=${{ env.repoUrl }}&issuetracker=${{ env.repoUrl }}/issues' | |
https: true | |
filePath: CodeNav/CodeNav.VS2019/bin/release/CodeNav.VS2019.vsix | |
- name: Publish to Open VSIX Gallery - VS2022 | |
uses: leandro-hermes/[email protected] | |
with: | |
host: 'www.vsixgallery.com' | |
path: '/api/upload?repo=${{ env.repoUrl }}&issuetracker=${{ env.repoUrl }}/issues' | |
https: true | |
filePath: CodeNav/CodeNav.VS2022/bin/release/CodeNav.VS2022.vsix |