fix(ci): update release workflow for moved solution (#4) #2
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| changelog: | |
| uses: CodingWithCalvin/.github/.github/workflows/generate-changelog.yml@main | |
| release: | |
| needs: changelog | |
| runs-on: windows-latest | |
| outputs: | |
| version: ${{ steps.version.outputs.VERSION }} | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Get version from tag | |
| id: version | |
| run: | | |
| $tag = "${{ github.ref_name }}" | |
| $version = $tag -replace '^v', '' | |
| echo "VERSION=$version" >> $env:GITHUB_OUTPUT | |
| echo "TAG=$tag" >> $env:GITHUB_OUTPUT | |
| shell: pwsh | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Create artifacts directory | |
| run: New-Item -ItemType Directory -Force -Path artifacts/packages | |
| - name: Build SDK | |
| run: dotnet build src/CodingWithCalvin.VsixSdk/CodingWithCalvin.VsixSdk.csproj -c Release -p:Version=${{ steps.version.outputs.VERSION }} | |
| - name: Build Templates | |
| run: dotnet pack src/CodingWithCalvin.VsixSdk.Templates/CodingWithCalvin.VsixSdk.Templates.csproj -c Release -p:Version=${{ steps.version.outputs.VERSION }} | |
| - name: NuGet login (OIDC) | |
| uses: nuget/login@v1 | |
| with: | |
| user: ${{ secrets.NUGET_USERNAME }} | |
| - name: Publish SDK to NuGet | |
| run: dotnet nuget push artifacts/packages/CodingWithCalvin.VsixSdk.${{ steps.version.outputs.VERSION }}.nupkg --source https://api.nuget.org/v3/index.json --skip-duplicate | |
| - name: Publish Templates to NuGet | |
| run: dotnet nuget push artifacts/packages/CodingWithCalvin.VsixSdk.Templates.${{ steps.version.outputs.VERSION }}.nupkg --source https://api.nuget.org/v3/index.json --skip-duplicate | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: v${{ steps.version.outputs.VERSION }} | |
| name: v${{ steps.version.outputs.VERSION }} | |
| body: ${{ needs.changelog.outputs.changelog }} | |
| files: | | |
| artifacts/packages/CodingWithCalvin.VsixSdk.${{ steps.version.outputs.VERSION }}.nupkg | |
| artifacts/packages/CodingWithCalvin.VsixSdk.Templates.${{ steps.version.outputs.VERSION }}.nupkg | |
| notify-bluesky: | |
| needs: release | |
| uses: CodingWithCalvin/.github/.github/workflows/bluesky-post.yml@main | |
| with: | |
| post_text: | | |
| 🚀 CodingWithCalvin.VsixSdk v${{ needs.release.outputs.version }} has been released! | |
| Build modern SDK-style Visual Studio extensions with ease. | |
| [📋 Release Notes](https://github.com/${{ github.repository }}/releases/tag/v${{ needs.release.outputs.version }}) | |
| [📦 NuGet](https://www.nuget.org/packages/CodingWithCalvin.VsixSdk) | |
| #dotnet #csharp #visualstudio #nuget | |
| embed_url: https://www.nuget.org/packages/CodingWithCalvin.VsixSdk | |
| embed_title: CodingWithCalvin.VsixSdk | |
| embed_description: An MSBuild SDK for modern SDK-style Visual Studio extension development | |
| secrets: | |
| BLUESKY_USERNAME: ${{ secrets.BLUESKY_USERNAME }} | |
| BLUESKY_APP_PASSWORD: ${{ secrets.BLUESKY_APP_PASSWORD }} | |
| notify-linkedin: | |
| needs: release | |
| uses: CodingWithCalvin/.github/.github/workflows/linkedin-post.yml@main | |
| with: | |
| post_text: | | |
| 🚀 CodingWithCalvin.VsixSdk v${{ needs.release.outputs.version }} has been released! | |
| Build modern SDK-style Visual Studio extensions with ease. | |
| 📋 Release Notes: https://github.com/${{ github.repository }}/releases/tag/v${{ needs.release.outputs.version }} | |
| 📦 NuGet: https://www.nuget.org/packages/CodingWithCalvin.VsixSdk | |
| #dotnet #csharp #visualstudio #nuget | |
| article_url: https://www.nuget.org/packages/CodingWithCalvin.VsixSdk | |
| article_title: CodingWithCalvin.VsixSdk | |
| article_description: An MSBuild SDK for modern SDK-style Visual Studio extension development | |
| secrets: | |
| LINKEDIN_ACCESS_TOKEN: ${{ secrets.LINKEDIN_ACCESS_TOKEN }} | |
| LINKEDIN_CLIENT_ID: ${{ secrets.LINKEDIN_CLIENT_ID }} |