Skip to content

Commit aab6afc

Browse files
committed
Refactor plugin upload job using matrix strategy
Simplify the workflow by switching to a matrix strategy for uploading plugins. This change consolidates individual upload steps into a single matrix job, making the code cleaner and easier to maintain. Added a comment link to the GitHub actions documentation for clarity.
1 parent 3d58ffc commit aab6afc

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

.github/workflows/main.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,24 @@ jobs:
4747
run: source\zip-plugin-files.ps1
4848

4949
# Upload plugins/artifacts
50-
- name: Upload HI2UC
51-
uses: ./.github/workflows/plugin-upload
52-
with:
53-
file-name: HI2UC
50+
# - name: Upload HI2UC
51+
# uses: ./.github/workflows/plugin-upload
52+
# with:
53+
# file-name: HI2UC
54+
#
55+
# - name: Upload HIColorer
56+
# uses: ./.github/workflows/plugin-upload
57+
# with:
58+
# file-name: HIColorer
5459

55-
- name: Upload HIColorer
60+
upload-job:
61+
runs-on: windows-latest
62+
needs: build-job
63+
strategy:
64+
matrix:
65+
artifact_name: [ "HI2UC", "HIColorer" ]
66+
steps:
67+
- name: Upload ${{matrix.artifact_name}}
5668
uses: ./.github/workflows/plugin-upload
5769
with:
58-
file-name: HIColorer
70+
file-name: ${{matrix.artifact_name}}

.github/workflows/plugin-upload/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
# https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-composite-action#creating-an-action-metadata-file
2+
13
name: Upload plugins
24
description: Upload plugin/artifact
3-
inputs:
5+
inputs:
46
file-name:
57
description: file name to create artifact (without extension e.g. HI2UC)
68
required: true

0 commit comments

Comments
 (0)