feat: add duplication detection #4
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| env: | |
| DOTNET_NOLOGO: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| rid: linux-x64 | |
| artifact: nativegen-linux-x64 | |
| - os: windows-latest | |
| rid: win-x64 | |
| artifact: nativegen-win-x64.exe | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| dotnet-quality: 'preview' | |
| - name: Restore dependencies | |
| run: dotnet restore NativeCodeGen.sln | |
| - name: Publish | |
| run: dotnet publish src/NativeCodeGen.Cli/NativeCodeGen.Cli.csproj -c Release -r ${{ matrix.rid }} -o ./publish | |
| - name: Rename artifact (Unix) | |
| if: runner.os != 'Windows' | |
| run: mv ./publish/nativegen ./publish/${{ matrix.artifact }} | |
| - name: Rename artifact (Windows) | |
| if: runner.os == 'Windows' | |
| run: move .\publish\nativegen.exe .\publish\${{ matrix.artifact }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: ./publish/${{ matrix.artifact }} | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ./artifacts | |
| - name: Prepare release files | |
| run: | | |
| mkdir -p release | |
| find ./artifacts -type f -exec mv {} ./release/ \; | |
| chmod +x ./release/nativegen-linux-* || true | |
| ls -la ./release/ | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: ./release/* | |
| generate_release_notes: true | |
| draft: false | |
| prerelease: ${{ contains(github.ref, '-') }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |