Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 0 additions & 79 deletions .github/workflows/on-pull-request.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/on-push-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./*)
Expand All @@ -57,3 +58,4 @@ jobs:
generate_release_notes: true
files: |
.out/*.zip
.out/*.nupkg
53 changes: 53 additions & 0 deletions .github/workflows/on-release-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions src/Terrabuild/README.md
Original file line number Diff line number Diff line change
@@ -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.
20 changes: 20 additions & 0 deletions src/Terrabuild/Terrabuild.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<PackAsTool>true</PackAsTool>
<ToolCommandName>terrabuild</ToolCommandName>
<AssemblyName>terrabuild</AssemblyName>
<IsPackable>true</IsPackable>
</PropertyGroup>
<ItemGroup>
<Compile Include="Contracts/Api.fs" />
Expand Down Expand Up @@ -67,6 +70,23 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Always</CopyToPublishDirectory>
</Content>
<None Include="README.md" Pack="true" PackagePath="\" />
<None Include="Terrabuild.png" Pack="true" PackagePath="\" />
</ItemGroup>

<PropertyGroup>
<!-- https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets#packing-using-a-nuspec -->
<PackageId>Terrabuild</PackageId>
<Authors>Pierre Chalamet</Authors>
<Title>Terrabuild</Title>
<Description>Terrabuild</Description>
<Copyright>Copyright 2023-present Magnus Opera</Copyright>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<PackageProjectUrl>https://github.com/magnusopera/terrabuild</PackageProjectUrl>
<RepositoryUrl>https://github.com/magnusopera/terrabuild.git</RepositoryUrl>
<PackageTags>terrabuild;build;monorepo</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>Terrabuild.png</PackageIcon>
</PropertyGroup>

</Project>
Binary file added src/Terrabuild/Terrabuild.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.