* Refactor search filtering and move ListWorkflowDefinitionsRequest file Updated the searching mechanism in `WorkflowDefinitionFilter.cs` by validating that Name and Description are not null before performing the search. In `ListWorkflowDefinitionsRequest.cs`, the file was moved from the Responses namespace to Requests and a new property `SearchTerm` was added, allowing filtering of workflow definitions by their name, ID or description. * Update code style settings for csproj The .DotSettings file for the project has been adjusted with changes to code naming rules and settings migration. These modifications adjust policies for naming conventions of Instance and Static fields, enhancing code style conformance. Also, an additional settings migration rule has been applied. * Add 'issue/*' branch to GitHub actions workflow The GitHub actions workflow has been updated to include the 'issue/*' branch. This ensures that any changes made in the 'issue/*' branches will trigger the workflow and any associated tests or builds, improving the overall continuous integration process. * Remove Skip and Take methods from SqlServerDialect The mentioned functions have been removed from SqlServerDialect class in the Elsa.Dapper module. The base class provides the correct default implementation for the SQL Server dialect.
109 lines
3.9 KiB
YAML
109 lines
3.9 KiB
YAML
name: Elsa 3 Packages
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
- 'feature/*'
|
|
- 'issue/*'
|
|
- 'enhancement/*'
|
|
- 'patch/*'
|
|
- 'fix/*'
|
|
release:
|
|
types: [ prereleased, published ]
|
|
env:
|
|
feedz_feed_source: 'https://f.feedz.io/elsa-workflows/elsa-3/nuget/index.json'
|
|
nuget_feed_source: 'https://api.nuget.org/v3/index.json'
|
|
|
|
jobs:
|
|
build:
|
|
name: Build packages
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Extract branch name
|
|
run: |
|
|
BRANCH_NAME=${{ github.ref }} # e.g., refs/heads/main
|
|
BRANCH_NAME=${BRANCH_NAME#refs/heads/} # remove the refs/heads/ prefix
|
|
# Extract the last part after the last slash of the branch name, if any, e.g., feature/issue-123 -> issue-123 and use it as the version prefix.
|
|
PACKAGE_PREFIX=$(echo $BRANCH_NAME | rev | cut -d/ -f1 | rev | tr '_' '-')
|
|
|
|
# If the branch name is main, use the preview version. Otherwise, use the branch name as the version prefix.
|
|
if [[ "${BRANCH_NAME}" == "main" ]]; then
|
|
PACKAGE_PREFIX="preview"
|
|
fi
|
|
|
|
echo "Ref: ${{ github.ref }}"
|
|
echo "Branch name: ${BRANCH_NAME}"
|
|
echo "Package prefix: ${PACKAGE_PREFIX}"
|
|
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV
|
|
echo "PACKAGE_PREFIX=${PACKAGE_PREFIX}" >> $GITHUB_ENV
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Verify commit exists in branch
|
|
run: |
|
|
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
|
|
git branch --remote --contains | grep origin/${BRANCH_NAME}
|
|
- name: Set VERSION variable
|
|
run: |
|
|
if [[ "${{ github.ref }}" == refs/tags/* && "${{ github.event_name }}" == "release" && "${{ github.event.action }}" == "published" ]]; then
|
|
TAG_NAME=${{ github.ref }} # e.g., refs/tags/3.0.0
|
|
TAG_NAME=${TAG_NAME#refs/tags/} # remove the refs/tags/ prefix
|
|
echo "VERSION=${TAG_NAME}" >> $GITHUB_ENV
|
|
else
|
|
echo "VERSION=3.1.0-${PACKAGE_PREFIX}.${{github.run_number}}" >> $GITHUB_ENV
|
|
fi
|
|
- name: Compile+Test+Pack
|
|
run: ./build.sh Compile+Test+Pack --version ${VERSION}
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: elsa-nuget-packages
|
|
path: packages/*nupkg
|
|
if: ${{ github.event_name == 'release' || github.event_name == 'push'}}
|
|
|
|
publish_preview_feedz:
|
|
name: Publish to feedz.io
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
if: ${{ github.event_name == 'release' || github.event_name == 'push'}}
|
|
steps:
|
|
- name: Download Packages
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: elsa-nuget-packages
|
|
|
|
- name: Publish to feedz.io
|
|
run: dotnet nuget push *.nupkg -k ${{ secrets.FEEDZ_API_KEY }} -s ${{ env.feedz_feed_source }} --skip-duplicate
|
|
|
|
publish_preview_nuget:
|
|
name: Publish preview to nuget.org
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
if: ${{ github.event_name == 'prereleased' && github.event.action == 'published' }}
|
|
steps:
|
|
- name: Download Packages
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: elsa-nuget-packages
|
|
|
|
- name: Publish to nuget.org
|
|
run: dotnet nuget push *.nupkg -k ${{ secrets.NUGET_API_KEY }} -s ${{ env.nuget_feed_source }} --skip-duplicate
|
|
|
|
publish_nuget:
|
|
name: Publish release to nuget.org
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
if: ${{ github.event_name == 'release' && github.event.action == 'published' }}
|
|
steps:
|
|
- name: Download Packages
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: elsa-nuget-packages
|
|
|
|
- name: Publish to nuget.org
|
|
run: dotnet nuget push *.nupkg -k ${{ secrets.NUGET_API_KEY }} -s ${{ env.nuget_feed_source }} --skip-duplicate
|