Skip to content

Commit

Permalink
Add workflow for uploading artifacts
Browse files Browse the repository at this point in the history
Created a new GitHub Actions workflow file to handle artifact uploads. Updated the main workflow to call the newly added upload-artifacts workflow, reducing redundancy and improving maintainability. Removed duplicate entries from the plugins list in the main workflow.
  • Loading branch information
ivandrofly committed Nov 22, 2024
1 parent a6f8411 commit a8e0f48
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
plugin: [ 'NoRecursiveDash', 'HIColorer', 'HI2UC', 'HIColorer', 'LinesUnbreaker' ]
plugin: [ 'NoRecursiveDash', 'HIColorer', 'HI2UC', 'LinesUnbreaker' ]

steps:
# Checkout the repository
Expand Down Expand Up @@ -42,19 +42,20 @@ jobs:
# Build the solution
- name: Build solution
run: msbuild "source\Plugins.Filter.slnf" /p:Configuration=Release /p:SkipSharedProject=true

- name: Create archives
shell: pwsh
run: source\zip-plugin-files.ps1

# - name: Upload Artifact (All)

# - name: Upload Artifact (All)
# uses: actions/upload-artifact@v4
# with:
# name: Plugins
# path: C:\plugins\*.dll
call-upload-artifacts-workflow:
- use: ./github/workflows/upload-artifacts.yml
# - name: Upload Artifact
# uses: actions/upload-artifact@v4
# with:
# name: Plugins
# path: C:\plugins\*.dll

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{matrix.plugin}}
path: C:\plugins\${{matrix.plugin}}.dll
# name: ${{matrix.plugin}}
# path: C:\plugins\${{matrix.plugin}}.dll
18 changes: 18 additions & 0 deletions .github/workflows/upload-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Upload artifacts

on:
workflow_call:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
plugin: [ 'NoRecursiveDash', 'HIColorer', 'HI2UC', 'LinesUnbreaker' ]

steps:
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{matrix.plugin}}
path: C:\plugins\${{matrix.plugin}}.dll

0 comments on commit a8e0f48

Please sign in to comment.