mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-09 09:45:06 +00:00
61 lines
1.7 KiB
YAML
61 lines
1.7 KiB
YAML
name: Essentials Plugin Build Get Version
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- feature-2.0.0/*
|
|
- hotfix-2.0.0/*
|
|
- release-2.0.0/*
|
|
- development-2.0.0
|
|
|
|
jobs:
|
|
Build_Project_4-Series:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Get branch name
|
|
id: get_branch
|
|
run: |
|
|
branch=${GITHUB_REF#refs/heads/}
|
|
echo "branch=$branch" >> $GITHUB_OUTPUT
|
|
echo "prerelease=${branch//\//-}" >> $GITHUB_OUTPUT
|
|
env:
|
|
GITHUB_REF: ${{ github.ref }}
|
|
|
|
- name: Git Version
|
|
id: get_version
|
|
uses: codacy/git-version@2.7.1
|
|
|
|
- name: Set up .NET
|
|
uses: actions/setup-dotnet@v3
|
|
with:
|
|
dotnet-version: "8.x"
|
|
|
|
- name: Restore .NET dependencies
|
|
run: dotnet restore
|
|
|
|
- name: Build .NET project
|
|
run: dotnet build --configuration Release -p:Version=${{ steps.get_version.outputs.version }}
|
|
|
|
- name: Pack .NET project
|
|
run: dotnet pack --configuration Release -p:Version=${{ steps.get_version.outputs.version }} --output ./output
|
|
|
|
- run: ls -la
|
|
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
prerelease: ${{ steps.get_branch.outcome.branch != 'main' }}
|
|
artifacts: "output/**/*.*(cpz|cplz)"
|
|
tag: ${{ steps.get_version.outputs.version }}
|
|
commit: ${{ github.sha }}
|
|
bodyFile: ./CHANGELOG.md
|
|
|
|
- name: Print results
|
|
run: |
|
|
echo "# Summary" >> $GITHUB_STEP_SUMMARY
|
|
echo "Version: ${{ steps.get_version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|