Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 27a1d50a78 | |||
| 9e28c95a3c | |||
| 5e61a35c53 | |||
| d270be3ef9 | |||
| 4dd0280534 | |||
| 9f04750c26 | |||
| d3ad8e828c | |||
| b9f474decf |
@@ -1,13 +1,10 @@
|
||||
name: .NET Build
|
||||
|
||||
on:
|
||||
pull_request
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
outputs:
|
||||
version: ${{ steps.set-version.outputs.version }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -18,8 +15,8 @@ jobs:
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 8.0.4xx # Align with global.json (including roll forward rules)
|
||||
|
||||
- name: Cache Nuget
|
||||
|
||||
- name: Cache Nuget
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.nuget/packages
|
||||
@@ -39,8 +36,8 @@ jobs:
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 8.0.4xx # Align with global.json (including roll forward rules)
|
||||
|
||||
- name: Cache Nuget
|
||||
|
||||
- name: Cache Nuget
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.nuget/packages
|
||||
@@ -51,9 +48,9 @@ jobs:
|
||||
|
||||
- name: ⚒️ Run tests
|
||||
run: ./build.sh test-only
|
||||
|
||||
|
||||
- name: Upload coverage reports to Codecov with GitHub Action
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
file: Converters/**/coverage.xml
|
||||
files: Converters/**/coverage.xml
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
@@ -3,15 +3,17 @@ name: .NET Build and Publish
|
||||
on:
|
||||
push:
|
||||
branches: ["main", "installer-test/**"]
|
||||
tags: ["v3.*"] # Manual delivery on every 3.x tag
|
||||
tags: ["v3.*.*"] # Manual delivery on every 3.x tag
|
||||
|
||||
jobs:
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
SPECKLE_VERSION: "unset"
|
||||
SEMVER: "unset"
|
||||
FILE_VERSION: "unset"
|
||||
outputs:
|
||||
version: ${{ steps.set-version.outputs.version }}
|
||||
semver: ${{ steps.set-version.outputs.semver }}
|
||||
file_version: ${{ steps.set-version.outputs.file_version }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -35,29 +37,37 @@ jobs:
|
||||
- name: ⬆️ Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: output-${{ env.SPECKLE_VERSION }}
|
||||
name: output-${{ env.SEMVER }}
|
||||
path: output/*.*
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
compression-level: 0 # no compression
|
||||
compression-level: 0 # no compression
|
||||
|
||||
- id: set-version
|
||||
name: Set version to output
|
||||
run: echo "version=${{ env.SPECKLE_VERSION }}" >> "$Env:GITHUB_OUTPUT"
|
||||
run: |
|
||||
echo "semver=${{ env.SEMVER }}" >> "$Env:GITHUB_OUTPUT"
|
||||
echo "file_version=${{ env.FILE_VERSION }}" >> "$Env:GITHUB_OUTPUT"
|
||||
|
||||
deploy-installers:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build-windows
|
||||
env:
|
||||
IS_PUBLIC_RELEASE: ${{ github.ref_type == 'tag' }}
|
||||
IS_TEST_INSTALLER: ${{ github.ref_type != 'tag' }}
|
||||
steps:
|
||||
- name: 🔫 Trigger Build Installers
|
||||
uses: ALEEF02/workflow-dispatch@v3.0.0
|
||||
uses: the-actions-org/workflow-dispatch@v4.0.0
|
||||
with:
|
||||
workflow: Build Installers
|
||||
repo: specklesystems/connector-installers
|
||||
token: ${{ secrets.CONNECTORS_GH_TOKEN }}
|
||||
inputs: '{ "run_id": "${{ github.run_id }}", "version": "${{ needs.build-windows.outputs.version }}", "public_release": ${{ env.IS_PUBLIC_RELEASE }}, "store_artifacts": ${{ env.IS_TEST_INSTALLER }} }'
|
||||
inputs: '{
|
||||
"run_id": "${{ github.run_id }}",
|
||||
"semver": "${{ needs.build-windows.outputs.semver }}",
|
||||
"file_version": "${{ needs.build-windows.outputs.file_version }}",
|
||||
"repo": "${{ github.repository }}",
|
||||
"is_public_release": ${{ env.IS_PUBLIC_RELEASE }}
|
||||
}'
|
||||
ref: main
|
||||
wait-for-completion: true
|
||||
wait-for-completion-interval: 10s
|
||||
|
||||
+3
-1
@@ -239,6 +239,7 @@ Target(
|
||||
async () =>
|
||||
{
|
||||
var version = await Versions.ComputeVersion();
|
||||
var fileVersion = await Versions.ComputeFileVersion();
|
||||
foreach (var group in await Affected.GetAffectedProjectGroups())
|
||||
{
|
||||
Console.WriteLine($"Zipping: {group.HostAppSlug} as {version}");
|
||||
@@ -280,7 +281,8 @@ Target(
|
||||
|
||||
string githubEnv = Environment.GetEnvironmentVariable("GITHUB_ENV") ?? "Unset";
|
||||
Console.WriteLine($"GITHUB_ENV: {githubEnv}");
|
||||
File.AppendAllText(githubEnv, $"SPECKLE_VERSION={version}{Environment.NewLine}");
|
||||
File.AppendAllText(githubEnv, $"SEMVER={version}{Environment.NewLine}");
|
||||
File.AppendAllText(githubEnv, $"FILE_VERSION={fileVersion}{Environment.NewLine}");
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
+19
-1
@@ -13,7 +13,25 @@ public static class SupportedCategoriesUtils
|
||||
/// <returns></returns>
|
||||
public static bool IsSupportedCategory(Category? category)
|
||||
{
|
||||
if (category is null || !category.IsVisibleInUI)
|
||||
if (category is null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// stacked walls are "not visible in the ui" whereas they clearly are.
|
||||
// see [CNX-1301: Revit Stacked Walls are not sending](https://linear.app/speckle/issue/CNX-1301/revit-stacked-walls-are-not-sending)
|
||||
#if REVIT2023_OR_GREATER
|
||||
if (category.BuiltInCategory == BuiltInCategory.OST_StackedWalls)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
if (category.Name == "Stacked Walls")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
if (!category.IsVisibleInUI) //&& category.BuiltInCategory != BuiltInCategory.OST_StackedWalls)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -88,6 +88,7 @@ public class ConfigBinding : IBinding
|
||||
_jsonCacheManager.UpdateObject("accounts", str);
|
||||
}
|
||||
|
||||
// TODO: need to be replaced with `GetAccountsConfig` function after some amount of time to not confuse ourselves.
|
||||
public AccountsConfig? GetUserSelectedAccountId()
|
||||
{
|
||||
var rawConfig = _jsonCacheManager.GetObject("accounts");
|
||||
@@ -111,6 +112,60 @@ public class ConfigBinding : IBinding
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public AccountsConfig? GetAccountsConfig()
|
||||
{
|
||||
var rawConfig = _jsonCacheManager.GetObject("accounts");
|
||||
if (rawConfig is null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var config = _serializer.Deserialize<AccountsConfig>(rawConfig);
|
||||
if (config is null)
|
||||
{
|
||||
throw new SerializationException("Failed to deserialize accounts config");
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
catch (SerializationException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetUserSelectedWorkspaceId(string workspaceId)
|
||||
{
|
||||
var str = _serializer.Serialize(new WorkspacesConfig() { UserSelectedWorkspaceId = workspaceId });
|
||||
_jsonCacheManager.UpdateObject("workspaces", str);
|
||||
}
|
||||
|
||||
public WorkspacesConfig? GetWorkspacesConfig()
|
||||
{
|
||||
var rawConfig = _jsonCacheManager.GetObject("workspaces");
|
||||
if (rawConfig is null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var config = _serializer.Deserialize<WorkspacesConfig>(rawConfig);
|
||||
if (config is null)
|
||||
{
|
||||
throw new SerializationException("Failed to deserialize workspaces config");
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
catch (SerializationException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -125,3 +180,8 @@ public class AccountsConfig
|
||||
{
|
||||
public string? UserSelectedAccountId { get; set; }
|
||||
}
|
||||
|
||||
public class WorkspacesConfig
|
||||
{
|
||||
public string? UserSelectedWorkspaceId { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user