Release #88
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: "Release" | |
on: | |
workflow_dispatch: | |
env: | |
ATC_EMAIL: '[email protected]' | |
ATC_NAME: 'Atc-Net' | |
NUGET_REPO_URL: 'https://api.nuget.org/v3/index.json' | |
jobs: | |
release: | |
if: github.ref == 'refs/heads/stable' | |
runs-on: windows-latest | |
steps: | |
- name: 🛒 Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.PAT_WORKFLOWS }} | |
- name: ⚛️ Sets environment variables - branch-name | |
uses: nelonoel/[email protected] | |
- name: ⚛️ Sets environment variables - Nerdbank.GitVersioning | |
uses: dotnet/nbgv@master | |
with: | |
setAllVars: true | |
- name: ⚙️ Setup dotnet 8.0.x | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
- name: 📐 Ensure nuget.org added as package source on Windows | |
run: dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org --configfile $env:APPDATA\NuGet\NuGet.Config | |
continue-on-error: true | |
- name: 🔁 Restore packages | |
run: dotnet restore | |
- name: 🛠️ Building library in release mode | |
run: dotnet build -c Release --no-restore /p:UseSourceLink=true | |
- name: ⏩ Merge to release-branch | |
run: | | |
git config --local user.email ${{ env.ATC_EMAIL }} | |
git config --local user.name ${{ env.ATC_NAME }} | |
git checkout release | |
git merge --ff-only stable | |
git push origin release | |
- name: 🗳️ Creating library package for release | |
run: dotnet pack -c Release --no-restore -o ${GITHUB_WORKSPACE}/packages -p:RepositoryBranch=$BRANCH_NAME /p:PublicRelease=true | |
- name: 📦 Push packages to NuGet | |
run: | | |
cd ${GITHUB_WORKSPACE}/packages | |
dotnet nuget push Atc.Wpf.${{ env.NBGV_NuGetPackageVersion }}.nupkg -k ${{ secrets.NUGET_KEY }} -s ${{ env.NUGET_REPO_URL }} --skip-duplicate --no-symbols | |
dotnet nuget push Atc.Wpf.Controls.${{ env.NBGV_NuGetPackageVersion }}.nupkg -k ${{ secrets.NUGET_KEY }} -s ${{ env.NUGET_REPO_URL }} --skip-duplicate --no-symbols | |
dotnet nuget push Atc.Wpf.Controls.Sample.${{ env.NBGV_NuGetPackageVersion }}.nupkg -k ${{ secrets.NUGET_KEY }} -s ${{ env.NUGET_REPO_URL }} --skip-duplicate --no-symbols | |
dotnet nuget push Atc.Wpf.FontIcons.${{ env.NBGV_NuGetPackageVersion }}.nupkg -k ${{ secrets.NUGET_KEY }} -s ${{ env.NUGET_REPO_URL }} --skip-duplicate --no-symbols | |
dotnet nuget push Atc.Wpf.Theming.${{ env.NBGV_NuGetPackageVersion }}.nupkg -k ${{ secrets.NUGET_KEY }} -s ${{ env.NUGET_REPO_URL }} --skip-duplicate --no-symbols |