Skip to content

Centralized GitHub Actions workflows for AppifySheets projects

Notifications You must be signed in to change notification settings

AppifySheets/github-workflows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

GitHub Workflows

Centralized GitHub Actions workflows for AppifySheets projects. These reusable workflows provide standardized CI/CD processes across all repositories.

Available Workflows

1. .NET Build and Test (dotnet-build-test.yml)

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: false

2. NuGet Package Publishing (dotnet-nuget-publish.yml)

Creates 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 }}

3. GitHub Release Creation (github-release.yml)

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 jobs

Complete Example

Here'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'

Required Secrets

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

Best Practices

  1. Versioning: Use semantic versioning (e.g., v1.0.0) for tags
  2. Branch Protection: Protect your main branch and require PR reviews
  3. Testing: Always run tests before publishing packages
  4. Documentation: Keep your project and package documentation up to date

Contributing

To add or modify workflows:

  1. Create a new branch
  2. Make your changes
  3. Test thoroughly with a sample repository
  4. Submit a pull request

Support

For issues or questions, please open an issue in this repository.

Collaboration by Claude

About

Centralized GitHub Actions workflows for AppifySheets projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published