diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..ce873b1 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.yml] +indent_size = 2 diff --git a/.github/workflows/greeting_action.yml b/.github/workflows/greeting_action.yml new file mode 100644 index 0000000..b9ef931 --- /dev/null +++ b/.github/workflows/greeting_action.yml @@ -0,0 +1,26 @@ +name: Greeting (Action) + +on: + push: + paths: + - actions/greeting/action.yml + - .github/workflows/greeting_action.yml + workflow_dispatch: + +jobs: + greeting: + name: Greeting + runs-on: ubuntu-latest + steps: + - name: Greeting + id: greeting + uses: DynamoDS/workflows/actions/greeting@master + with: + message: World + - name: Random number + run: echo "$RANDOM_NUMBER" + shell: bash + env: + RANDOM_NUMBER: ${{ steps.greeting.outputs.number }} + - name: Date + run: date diff --git a/.github/workflows/greeting_workflow.yml b/.github/workflows/greeting_workflow.yml new file mode 100644 index 0000000..cfe6324 --- /dev/null +++ b/.github/workflows/greeting_workflow.yml @@ -0,0 +1,15 @@ +name: Greeting (Workflow) + +on: + push: + paths: + - .github/workflows/greeting.yml + - .github/workflows/greeting_workflow.yml + workflow_dispatch: + +jobs: + greeting: + name: Greeting + uses: DynamoDS/workflows/.github/workflows/greeting.yml@master + with: + message: World diff --git a/.github/workflows/msbuild_action.yml b/.github/workflows/msbuild_action.yml new file mode 100644 index 0000000..c721b70 --- /dev/null +++ b/.github/workflows/msbuild_action.yml @@ -0,0 +1,30 @@ +name: MSBuild (Action) + +on: + push: + paths: + - actions/msbuild/action.yml + - .github/workflows/msbuild_action.yml + workflow_dispatch: + +jobs: + msbuild: + name: MSBuild + runs-on: windows-latest + steps: + - name: MSBuild + uses: DynamoDS/workflows/actions/msbuild@master + with: + repository: DynamoDS/Dynamo + dotnet_version: 8.0.x + solution_path: src\Dynamo.All.sln + build_configuration: Release + runtime_identifier: win-x64 + - name: Look for DynamoCLI.exe + run: | + Write-Output "***Locating DynamoCLI.exe!***" + if (Test-Path -Path "${{ github.workspace }}/bin/AnyCPU/Release/DynamoCLI.exe") { + Write-Output "DynamoCLI.exe exists!" + } else { + Write-Error "DynamoCLI.exe was not found!" + } diff --git a/.github/workflows/msbuild_workflow.yml b/.github/workflows/msbuild_workflow.yml new file mode 100644 index 0000000..bc24e54 --- /dev/null +++ b/.github/workflows/msbuild_workflow.yml @@ -0,0 +1,20 @@ +name: MSBuild (Workflow) + +on: + push: + paths: + - .github/workflows/msbuild.yml + - .github/workflows/msbuild_workflow.yml + workflow_dispatch: + +jobs: + msbuild: + name: MSBuild + uses: DynamoDS/workflows/.github/workflows/msbuild.yml@master + with: + runner: windows-latest + repository: DynamoDS/Dynamo + dotnet_version: 8.0.x + solution_path: src\Dynamo.All.sln + build_configuration: Release + runtime_identifier: win-x64 diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9d0a7f2 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "*.yml": "github-actions-workflow" + } +} diff --git a/README.md b/README.md index 5cd7790..632b078 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,17 @@ Collection of reusable workflows and compostite actions ## Reusable Workflows -- [greeting.yml](./.github/workflows/greeting.yml) -- [msbuild.yml](./.github/workflows/msbuild.yml) +| workflow | description | example workflow | status | +| -- | -- | -- | -- | +| [greeting.yml](https://github.com/DynamoDS/workflows/blob/master/workflows/greeting.yml) | sample workflow | [greeting_workflow.yml](.github/workflows/greeting_workflow.yml) | [![Greeting (Workflow)](https://github.com/DynamoDS/workflows/actions/workflows/greeting_workflow.yml/badge.svg)](https://github.com/DynamoDS/workflows/actions/workflows/greeting_workflow.yml) | +| [msbuild.yml](https://github.com/DynamoDS/workflows/blob/master/workflows/msbuild.yml) | Build a project with msbuild | [msbuild_workflow.yml](.github/workflows/msbuild_workflow.yml) | [![MSBuild (Workflow)](https://github.com/DynamoDS/workflows/actions/workflows/msbuild_workflow.yml/badge.svg)](https://github.com/DynamoDS/workflows/actions/workflows/msbuild_workflow.yml) | ## Composite Actions -- [greeting](./.github/actions/greeting/action.yml) -- [msbuild](./.github/actions/msbuild/action.yml) - -Usage: - -[DynamoDS/workflow-examples](https://github.com/DynamoDS/workflows-examples) +| action | description | example workflow | status | +| -- | -- | -- | -- | +| [greeting.yml](https://github.com/DynamoDS/workflows/blob/master/.github/actions/greetion/action.yml) | sample workflow | [greeting_action.yml](.github/workflows/greeting_actions.yml) | [![Greeting (Action)](https://github.com/DynamoDS/workflows/actions/workflows/greeting_action.yml/badge.svg)](https://github.com/DynamoDS/workflows/actions/workflows/greeting_action.yml) | +| [msbuild.yml](https://github.com/DynamoDS/workflows/blob/master/.github/actions/msbuild/action.yml) | Build a project with msbuild | [msbuild_action.yml](.github/workflows/msbuild_action.yml) | [![MSBuild (Action)](https://github.com/DynamoDS/workflows/actions/workflows/msbuild_action.yml/badge.svg)](https://github.com/DynamoDS/workflows/actions/workflows/msbuild_action.yml) | More info: diff --git a/actions/README.md b/actions/README.md new file mode 100644 index 0000000..a92bb33 --- /dev/null +++ b/actions/README.md @@ -0,0 +1,4 @@ +# Composite Actions + +- [greeting](./greeting) +- [msbuild](./msbuild) diff --git a/.github/actions/greeting/action.yml b/actions/greeting/action.yml similarity index 100% rename from .github/actions/greeting/action.yml rename to actions/greeting/action.yml diff --git a/.github/actions/msbuild/action.yml b/actions/msbuild/action.yml similarity index 100% rename from .github/actions/msbuild/action.yml rename to actions/msbuild/action.yml diff --git a/workflows/README.md b/workflows/README.md new file mode 100644 index 0000000..2a6046e --- /dev/null +++ b/workflows/README.md @@ -0,0 +1,9 @@ +# Reusable Workflows + +> [!IMPORTANT] +> Reusable Workflow files must be placed in .github/workflows folder. See: [Calling a reusable workflow](https://docs.github.com/en/actions/using-workflows/reusing-workflows#calling-a-reusable-workflow) + +Files here are symlinks to the files in [.github/workflows](./.github/workflows) folder + +- [greeting](greeting.yml) +- [msbuild](msbuild.yml) diff --git a/workflows/greeting.yml b/workflows/greeting.yml new file mode 120000 index 0000000..75fa631 --- /dev/null +++ b/workflows/greeting.yml @@ -0,0 +1 @@ +../.github/workflows/greeting.yml \ No newline at end of file diff --git a/workflows/msbuild.yml b/workflows/msbuild.yml new file mode 120000 index 0000000..2d74cbe --- /dev/null +++ b/workflows/msbuild.yml @@ -0,0 +1 @@ +../.github/workflows/msbuild.yml \ No newline at end of file