Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GitActions] Updates #347

Merged
merged 2 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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