Skip to content

Commit

Permalink
Merge pull request #347 from zapadi/dev/rework-foundation
Browse files Browse the repository at this point in the history
[GitActions] Updates
  • Loading branch information
zapadi authored Feb 12, 2024
2 parents 7abac52 + b3ec8bb commit cc5ebc6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
required: false
default: 'Manual build and run tests'
workflow_run:
workflows: [ Build ]
workflows: [ 'Build' ]
types:
- completed

Expand All @@ -24,7 +24,7 @@ jobs:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
steps:
- name: Test
if: ${{ github.event.workflow_run.conclusion == 'success' }}
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
timeout-minutes: 60
run: >-
dotnet test "${{ env.PROJECT_PATH }}"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
default: 'Manual run'
workflow_call:
push:
# paths:
# - '**.cs'
# - '**.csproj'
paths:
- '**.cs'
- '**.csproj'
pull_request:
branches: [ master ]
paths:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ name: 'Pack'

on:
workflow_run:
workflows: [ 'Build' ]
workflows: [ 'Build and Test' ]
types: [ requested ]
branches: [ master ]

workflow_call:

workflow_dispatch:
inputs:
reason:
Expand Down Expand Up @@ -48,7 +50,7 @@ jobs:
- name: Validate Version matches SemVer format
run: |
if [[ ! "$VERSION" =~ ^([0-9]+\.){2}[0-9]+$ ]]; then
if [[ ! "$VERSION" =~ ^([0-9]+\.){2}[0-9]+(-[\w.]+)?$ ]]; then
echo "The version does not match the SemVer format (X.Y.Z). Please provide a valid version."
exit 1
fi
Expand Down Expand Up @@ -93,7 +95,7 @@ jobs:
--version 0.0.1-preview.304
- name: Validate NuGet package
run: |
run: >-
dotnet-validate package local ./artifacts/**.nupkg
- name: Upload artifacts
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ on:
description: 'The reason for running the workflow'
required: false
default: 'Manual publish to nuget'

workflow_run:
workflows: [ 'Pack' ]
types:
- completed
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+(-[\w.]+)?'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down

0 comments on commit cc5ebc6

Please sign in to comment.