Centralized GitHub Actions workflows for AppifySheets projects. These reusable workflows provide standardized CI/CD processes across all repositories.
Builds and tests .NET projects with comprehensive options.
Usage:
jobs:
build:
uses: AppifySheets/github-workflows/.github/workflows/dotnet-build-test.yml@main
with:
solution-path: '**/*.sln'
dotnet-version: '8.0.x'
test-projects: '**/*Tests.csproj'
build-configuration: 'Release'
run-tests: true
upload-test-results: true
upload-coverage: falseCreates and publishes NuGet packages to NuGet.org.
Usage:
jobs:
publish:
uses: AppifySheets/github-workflows/.github/workflows/dotnet-nuget-publish.yml@main
with:
project-paths: 'src/MyLibrary/MyLibrary.csproj'
package-version: '1.0.0' # Optional, can use tag version
push-to-nuget: true
secrets:
nuget-api-key: ${{ secrets.NUGET_API_KEY }}Creates GitHub releases with changelog generation and asset attachments.
Usage:
jobs:
release:
uses: AppifySheets/github-workflows/.github/workflows/github-release.yml@main
with:
tag-name: ${{ github.ref_name }}
generate-notes: true
prerelease: false
draft: false
attach-artifacts: 'nuget-packages' # Artifact names from previous jobsHere's a complete workflow that builds, tests, publishes NuGet packages, and creates a release:
name: CI/CD Pipeline
on:
push:
branches: [ main ]
tags: [ 'v*' ]
pull_request:
branches: [ main ]
jobs:
# Build and test on all pushes and PRs
build-test:
uses: AppifySheets/github-workflows/.github/workflows/dotnet-build-test.yml@main
with:
solution-path: '**/*.sln'
run-tests: true
upload-test-results: true
# Publish NuGet packages only on version tags
publish-nuget:
if: startsWith(github.ref, 'refs/tags/v')
needs: build-test
uses: AppifySheets/github-workflows/.github/workflows/dotnet-nuget-publish.yml@main
with:
project-paths: 'src/MyLibrary/MyLibrary.csproj;src/MyOtherLib/MyOtherLib.csproj'
push-to-nuget: true
secrets:
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
# Create GitHub release on version tags
create-release:
if: startsWith(github.ref, 'refs/tags/v')
needs: publish-nuget
uses: AppifySheets/github-workflows/.github/workflows/github-release.yml@main
with:
generate-notes: true
attach-artifacts: 'nuget-packages'Configure these secrets in your repository settings:
- NUGET_API_KEY: Your NuGet.org API key for package publishing
- Other secrets as needed for your specific workflows
- Versioning: Use semantic versioning (e.g., v1.0.0) for tags
- Branch Protection: Protect your main branch and require PR reviews
- Testing: Always run tests before publishing packages
- Documentation: Keep your project and package documentation up to date
To add or modify workflows:
- Create a new branch
- Make your changes
- Test thoroughly with a sample repository
- Submit a pull request
For issues or questions, please open an issue in this repository.
Collaboration by Claude