Skip to content

Bump EliteAPI.Web from 3.1.12 to 3.1.13 #143

Bump EliteAPI.Web from 3.1.12 to 3.1.13

Bump EliteAPI.Web from 3.1.12 to 3.1.13 #143

Workflow file for this run

name: .NET
on:
push:
jobs:
release:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Setup .NET 6
uses: actions/setup-dotnet@v2
with:
dotnet-version: "6.0.x"
- name: Setup GitVersion
if: github.ref == 'refs/heads/main'
run: dotnet tool install --global GitVersion.Tool
- name: Fetch for GitVersion
if: github.ref == 'refs/heads/main'
run: git fetch --tags --unshallow
- name: Update version
if: github.ref == 'refs/heads/main'
run: dotnet-gitversion /updateprojectfiles /updateassemblyinfo /output buildserver
- name: Set job output
if: github.ref == 'refs/heads/main'
id: VERSION
run: |
echo '::set-output name=label::${{env.GitVersion_PreReleaseLabel}}'
echo '::set-output name=semver::${{env.GitVersion_LegacySemVer}}'
echo '::set-output name=nuget::${{env.GitVersion_NuGetPreReleaseTagV2}}'
echo '::set-output name=applicable::${{env.GitVersion_PreReleaseLabel == 'alpha' || env.GitVersion_PreReleaseLabel == 'beta' }}'
- name: Apply changes
if: ${{ steps.VERSION.outputs.applicable == 'true' && github.ref == 'refs/heads/main' }}
uses: EndBug/[email protected]
with:
author_name: github-actions[bot]
author_email: github-actions[bot]@users.noreply.github.com
message: "Bumped version to ${{env.GitVersion_LegacySemVer}}"
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
- name: Setup NuGet
uses: NuGet/setup-nuget@v1
- name: Restore Packages
run: dotnet restore
- name: Build
run: dotnet build -c Release
- name: Make EliteVA-${{ steps.VERSION.outputs.semver }}
if: github.ref == 'refs/heads/main' && ${{ steps.VERSION.outputs.applicable == 'true' }}
run: mkdir "EliteVA-${{ steps.VERSION.outputs.semver }}"
- name: Copy to EliteVA-${{ steps.VERSION.outputs.semver }}
if: github.ref == 'refs/heads/main' && ${{ steps.VERSION.outputs.applicable == 'true' }}
run: xcopy "EliteVA\bin\Release\net472\" "EliteVA-${{ steps.VERSION.outputs.semver }}" /Y /I
- name: Add Costura.Fody
if: github.ref == 'refs/heads/main' && ${{ steps.VERSION.outputs.applicable == 'true' }}
run: dotnet add package Costura.Fody
working-directory: EliteVA
- name: Build
if: github.ref == 'refs/heads/main' && ${{ steps.VERSION.outputs.applicable == 'true' }}
run: dotnet build -c Release
- name: Copy to EliteVA-${{ steps.VERSION.outputs.semver }}
if: github.ref == 'refs/heads/main' && ${{ steps.VERSION.outputs.applicable == 'true' }}
run: xcopy "EliteVA\bin\Release\net472\" "EliteVA-${{ steps.VERSION.outputs.semver }}" /Y /I
- name: Generate profile
if: github.ref == 'refs/heads/main' && ${{ steps.VERSION.outputs.applicable == 'true' }}
run: dotnet run --project ProfileGenerator -c Release
- name: Copy to EliteVA-${{ steps.VERSION.outputs.semver }}\EliteVA-${{ steps.VERSION.outputs.semver }}.vap
if: github.ref == 'refs/heads/main' && ${{ steps.VERSION.outputs.applicable == 'true' }}
run: echo F|xcopy "Profile.vap" "EliteVA-${{ steps.VERSION.outputs.semver }}.vap" /Y /I
- name: Zip dist
if: github.ref == 'refs/heads/main' && ${{ steps.VERSION.outputs.applicable == 'true' }}
uses: thedoctor0/[email protected]
with:
type: "zip"
filename: "EliteVA-${{ steps.VERSION.outputs.semver }}.zip"
path: "EliteVA-${{ steps.VERSION.outputs.semver }}/*"
- name: Release
if: github.ref == 'refs/heads/main' && ${{ steps.VERSION.outputs.applicable == 'true' }}
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.VERSION.outputs.semver }}
files: |
EliteVA-${{ steps.VERSION.outputs.semver }}.zip
EliteVA-${{ steps.VERSION.outputs.semver }}.vap
prerelease: ${{ steps.extract_branch.outputs.branch != 'main' }}
draft: true