diff --git a/.github/workflows/on-pull-request.yml b/.github/workflows/on-pull-request.yml deleted file mode 100644 index 8d745da7..00000000 --- a/.github/workflows/on-pull-request.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: 🦄 Pull Request - -on: - pull_request: - types: [opened, synchronize, reopened] - workflow_dispatch: - -permissions: - contents: read - pull-requests: read - -jobs: - pr_checks: - runs-on: ubuntu-latest - if: github.event.pull_request.head.repo.full_name != github.repository - - steps: - - name: Info - run: echo 'Building ${{ github.ref }}' - - - name: Cloning repository - uses: actions/checkout@v4 - - - name: Setup .NET Core - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 10.0.100 - - - name: Self Build - run: | - echo "# Self Build" >> $GITHUB_STEP_SUMMARY - make self-ci engine=podman - - - name: Check Docs - run: | - make try-docs - - - name: Create Test Report - uses: magnusopera/test-reporter@main - if: always() - with: - name: Unit Tests Report - path: '**/*.trx' - reporter: dotnet-trx - fail-on-error: false - fail-on-empty: false - use-actions-summary: true - - - name: Self Integration Tests - run: make smoke-tests terrabuild=$PWD/.out/dotnet/terrabuild - - - name: Include Build Logs - if: always() - run: | - ls -alR > terrabuild-debug.files.txt - - echo "# Self Tests" >> $GITHUB_STEP_SUMMARY - echo "## basic" >> $GITHUB_STEP_SUMMARY - cat tests/basic/terrabuild-debug.md >> $GITHUB_STEP_SUMMARY - - echo "## cluster-layers" >> $GITHUB_STEP_SUMMARY - cat tests/cluster-layers/terrabuild-debug.md >> $GITHUB_STEP_SUMMARY - - echo "## multirefs" >> $GITHUB_STEP_SUMMARY - cat tests/multirefs/terrabuild-debug.md >> $GITHUB_STEP_SUMMARY - - echo "## simple" >> $GITHUB_STEP_SUMMARY - cat tests/simple/terrabuild-debug.md >> $GITHUB_STEP_SUMMARY - - echo "## indirect-target" >> $GITHUB_STEP_SUMMARY - cat tests/indirect-target/terrabuild-debug.md >> $GITHUB_STEP_SUMMARY - - - name: Upload Terrabuild Debug - uses: actions/upload-artifact@v4 - if: always() - with: - name: Terrabuild Debug - path: | - **/terrabuild-debug.* diff --git a/.github/workflows/on-push-tag.yml b/.github/workflows/on-push-tag.yml index 1a020c4b..e6070be0 100644 --- a/.github/workflows/on-push-tag.yml +++ b/.github/workflows/on-push-tag.yml @@ -34,6 +34,7 @@ jobs: - name: Pack run: | + (cd .out/dotnet; zip ../terrabuild-${BUILD_VERSION}-dotnet.zip ./*) (cd .out/windows/x64; zip ../../terrabuild-${BUILD_VERSION}-windows-x64.zip ./*) (cd .out/windows/arm64; zip ../../terrabuild-${BUILD_VERSION}-windows-arm64.zip ./*) (cd .out/linux/x64; zip ../../terrabuild-${BUILD_VERSION}-linux-x64.zip ./*) @@ -57,3 +58,4 @@ jobs: generate_release_notes: true files: | .out/*.zip + .out/*.nupkg diff --git a/.github/workflows/on-release-published.yml b/.github/workflows/on-release-published.yml index 4b483f68..3bf718ff 100644 --- a/.github/workflows/on-release-published.yml +++ b/.github/workflows/on-release-published.yml @@ -11,6 +11,23 @@ permissions: pull-requests: write jobs: + release-nuget: + runs-on: ubuntu-latest + steps: + - name: Setup .NET Core + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 10.0.100 + + - name: Download Github Release artifacts + uses: robinraju/release-downloader@v1.11 + with: + tag: ${{github.ref_name}} + fileName: '*.nupkg' + + - name: NuGet Release + run: dotnet nuget push Terrabuild.${{github.ref_name}}.nupkg --skip-duplicate --api-key ${{secrets.NUGET_KEY}} --source https://api.nuget.org/v3/index.json + sign-and-notarize: runs-on: macos-latest steps: @@ -37,7 +54,9 @@ jobs: - name: Sign Binaries run: | codesign --force --timestamp --sign "Developer ID Application: Magnus Opera (${{ secrets.MAC_DEV_TEAM_ID }})" .out/darwin/arm64/terrabuild --options=runtime --no-strict --entitlements entitlements.plist + codesign --force --timestamp --sign "Developer ID Application: Magnus Opera (${{ secrets.MAC_DEV_TEAM_ID }})" .out/darwin/x64/terrabuild --options=runtime --no-strict --entitlements entitlements.plist (cd .out/darwin/arm64; zip ../terrabuild-${{ github.ref_name }}-darwin-arm64.zip ./*) + (cd .out/darwin/x64; zip ../terrabuild-${{ github.ref_name }}-darwin-x64.zip ./*) - name: Notarize arm64 uses: GuillaumeFalourd/notary-tools@v1 @@ -50,6 +69,17 @@ jobs: xcode_path: '/Applications/Xcode_16.4.app' staple: false + - name: Notarize x64 + uses: GuillaumeFalourd/notary-tools@v1 + timeout-minutes: 5 + with: + product_path: ".out/darwin/terrabuild-${{github.ref_name}}-darwin-x64.zip" + apple_id: ${{ secrets.MAC_DEV_LOGIN }} + password: ${{ secrets.MAC_DEV_PASSWORD }} + team_id: ${{ secrets.MAC_DEV_TEAM_ID }} + xcode_path: '/Applications/Xcode_16.4.app' + staple: false + - name: Upload signed macOS artifacts uses: softprops/action-gh-release@v2.0.6 with: @@ -58,6 +88,29 @@ jobs: .out/darwin/terrabuild-${{github.ref_name}}-darwin-arm64.zip .out/darwin/terrabuild-${{github.ref_name}}-darwin-x64.zip + - name: Remove unsigned macOS artifact + uses: actions/github-script@v7 + with: + script: | + const tag = context.ref.replace('refs/tags/', ''); + const unsignedName = `terrabuild-${tag}-darwin-unsigned.zip`; + const { data: release } = await github.rest.repos.getReleaseByTag({ + owner: context.repo.owner, + repo: context.repo.repo, + tag, + }); + const asset = release.assets.find(a => a.name === unsignedName); + if (!asset) { + core.info(`Unsigned artifact not found: ${unsignedName}`); + return; + } + await github.rest.repos.deleteReleaseAsset({ + owner: context.repo.owner, + repo: context.repo.repo, + asset_id: asset.id, + }); + core.info(`Deleted unsigned artifact: ${unsignedName}`); + update-homebrew-tap: uses: ./.github/workflows/release-homebrew-tap.yml permissions: diff --git a/Makefile b/Makefile index 2138b0a8..c3206f73 100644 --- a/Makefile +++ b/Makefile @@ -53,8 +53,10 @@ usage: publish: dotnet publish -c $(config) -p:Version=$(version) -o $(PWD)/.out/dotnet src/Terrabuild + dotnet pack -c $(config) -p:Version=$(version) -o .out publish-darwin: + dotnet publish -c $(config) -r osx-x64 -p:PublishSingleFile=true --self-contained -p:Version=$(version) -p:IncludeNativeLibrariesForSelfExtract=true -o $(PWD)/.out/darwin/x64 src/Terrabuild dotnet publish -c $(config) -r osx-arm64 -p:PublishSingleFile=true --self-contained -p:Version=$(version) -p:IncludeNativeLibrariesForSelfExtract=true -o $(PWD)/.out/darwin/arm64 src/Terrabuild publish-linux: diff --git a/src/Terrabuild/README.md b/src/Terrabuild/README.md new file mode 100644 index 00000000..ee6a4b15 --- /dev/null +++ b/src/Terrabuild/README.md @@ -0,0 +1,7 @@ +# ✨ Terrabuild + +Terrabuild helps you build your monorepos efficiently. + +See [Documentation](https://terrabuild.io) for more information. + +Terrabuild use [FSL-1.1-Apache-2.0](https://raw.githubusercontent.com/magnusopera/terrabuild/main/LICENSE.md). By using this software, you agree to the terms of this license. diff --git a/src/Terrabuild/Terrabuild.fsproj b/src/Terrabuild/Terrabuild.fsproj index 2bb14a89..ef73d5e1 100644 --- a/src/Terrabuild/Terrabuild.fsproj +++ b/src/Terrabuild/Terrabuild.fsproj @@ -1,7 +1,10 @@ Exe + true + terrabuild terrabuild + true @@ -67,6 +70,23 @@ PreserveNewest Always + + + + + Terrabuild + Pierre Chalamet + Terrabuild + Terrabuild + Copyright 2023-present Magnus Opera + LICENSE.md + https://github.com/magnusopera/terrabuild + https://github.com/magnusopera/terrabuild.git + terrabuild;build;monorepo + README.md + Terrabuild.png + + \ No newline at end of file diff --git a/src/Terrabuild/Terrabuild.png b/src/Terrabuild/Terrabuild.png new file mode 100644 index 00000000..78686fd0 Binary files /dev/null and b/src/Terrabuild/Terrabuild.png differ