Made filter apply to all DMD sources #23
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build, Publish, and Release .NET App | |
| on: | |
| workflow_dispatch: # Enables manual trigger from the UI | |
| push: | |
| tags: | |
| - 'v*' # Trigger the action when you push a tag (e.g., v1.0.0) | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest # This will be overridden by the matrix strategy | |
| strategy: | |
| matrix: | |
| os: [win-x64, linux-x64, linux-arm64, osx-x64, osx-arm64] # Define OS/Arch targets | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Set up .NET 9.0 | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: '9.0' | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build the project | |
| run: dotnet build --configuration Release | |
| # ------ DATA RETRIEVER ------ | |
| - name: Publish as a (self-contained) single file [data-retriever] | |
| run: | | |
| cd src/data_retriever | |
| dotnet publish -c Release -r ${{ matrix.os }} --self-contained true /p:PublishSingleFile=true -o ./publish/${{ matrix.os }} | |
| - name: Archive published files [data-retriever] | |
| run: | | |
| cd src/data_retriever | |
| tree | |
| cd ./publish/${{ matrix.os }} | |
| tar -czvf ../data-retriever-${{ matrix.os }}.tar.gz . | |
| tree | |
| - name: Upload build artifacts [data-retriever] | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: publish-data-retriever-${{ matrix.os }} | |
| path: src/data_retriever/publish/data-retriever-${{ matrix.os }}.tar.gz # Upload the .tar.gz file for this platform | |
| # ------ ELM GENERATOR ------ | |
| - name: Publish as a (self-contained) single file [elm-generator] | |
| run: | | |
| cd src/elm_generator | |
| dotnet publish -c Release -r ${{ matrix.os }} --self-contained true /p:PublishSingleFile=true -o ./publish/${{ matrix.os }} | |
| - name: Archive published files [data-retriever] | |
| run: | | |
| cd src/elm_generator | |
| tree | |
| cd ./publish/${{ matrix.os }} | |
| tar -czvf ../elm-generator-${{ matrix.os }}.tar.gz . | |
| tree | |
| - name: Upload build artifacts [data-retriever] | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: publish-elm-generator-${{ matrix.os }} | |
| path: src/elm_generator/publish/elm-generator-${{ matrix.os }}.tar.gz # Upload the .tar.gz file for this platform | |
| release: | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/') # Ensures this job only runs when there is a tag | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| # ------ DATA RETRIEVER ------ | |
| - name: Download build artifacts (Windows) | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: publish-data-retriever-win-x64 # Download the Windows artifact | |
| - name: Download build artifacts (Linux x64) | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: publish-data-retriever-linux-x64 # Download the Linux x64 artifact | |
| - name: Download build artifacts (Linux ARM64) | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: publish-data-retriever-linux-arm64 # Download the Linux ARM64 artifact | |
| - name: Download build artifacts (macOS x64) | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: publish-data-retriever-osx-x64 # Download the macOS x64 artifact | |
| - name: Download build artifacts (macOS ARM64) | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: publish-data-retriever-osx-arm64 # Download the macOS ARM64 artifact | |
| # ------ ELM GENERATOR ------ | |
| - name: Download build artifacts (Windows) | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: publish-elm-generator-win-x64 # Download the Windows artifact | |
| - name: Download build artifacts (Linux x64) | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: publish-elm-generator-linux-x64 # Download the Linux x64 artifact | |
| - name: Download build artifacts (Linux ARM64) | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: publish-elm-generator-linux-arm64 # Download the Linux ARM64 artifact | |
| - name: Download build artifacts (macOS x64) | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: publish-elm-generator-osx-x64 # Download the macOS x64 artifact | |
| - name: Download build artifacts (macOS ARM64) | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: publish-elm-generator-osx-arm64 # Download the macOS ARM64 artifact | |
| - name: List all files | |
| run: | | |
| ls -la | |
| tree | |
| - name: Create a GitHub release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| data-retriever-win-x64.tar.gz | |
| data-retriever-linux-x64.tar.gz | |
| data-retriever-linux-arm64.tar.gz | |
| data-retriever-osx-x64.tar.gz | |
| data-retriever-osx-arm64.tar.gz | |
| elm-generator-win-x64.tar.gz | |
| elm-generator-linux-x64.tar.gz | |
| elm-generator-linux-arm64.tar.gz | |
| elm-generator-osx-x64.tar.gz | |
| elm-generator-osx-arm64.tar.gz | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |