Skip to content

Commit

Permalink
update settings & build
Browse files Browse the repository at this point in the history
  • Loading branch information
phnx47 committed Dec 17, 2024
1 parent f95f097 commit 3927085
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ branches:
required_pull_request_reviews: null
required_status_checks:
strict: false
contexts: ['Build, Test & Pack']
contexts: ['Build & Test (Windows)']
enforce_admins: false
required_linear_history: false
restrictions: null
27 changes: 1 addition & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
build-win:
name: Build, Test & Pack
name: Build & Test (Windows)
runs-on: windows-2022
steps:
- name: Checkout
Expand All @@ -23,28 +23,3 @@ jobs:
- name: Run tests
run: dotnet test --no-build -c Release

- name: Set Dev version
if: github.ref == 'refs/heads/main'
shell: bash
run: |
version="$(git describe --long --tags | sed 's/^v//;0,/-/s//./')"
if [ -z "${version}" ]; then
version="0.0.0.$(git rev-list --count HEAD)-g$(git rev-parse --short HEAD)"
fi
echo "VERSION=${version}" >> $GITHUB_ENV
- name: Set Release version
if: startsWith(github.ref, 'refs/tags/v')
shell: bash
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV

- name: Pack NuGet artifacts
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
run: dotnet pack --no-build -c Release -p:PackageVersion="${{ env.VERSION }}"

- name: Upload artifacts
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-artifact@v4
with:
name: nupkgs
path: src/**/*nupkg

0 comments on commit 3927085

Please sign in to comment.