From f6b6cb2664540e2adef9531b996a1675a1005dd7 Mon Sep 17 00:00:00 2001 From: Stepami Date: Sat, 16 May 2026 02:28:12 +0300 Subject: [PATCH] fix: hybrid tool --- .github/workflows/release.yml | 65 ++++++++++++------------------ src/HydraScript/HydraScript.csproj | 2 +- 2 files changed, 27 insertions(+), 40 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3df2e529..eb2dc90a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -72,10 +72,9 @@ jobs: versionSpec: '0.20.x' - name: Publish run: >- - dotnet publish ./src/HydraScript/HydraScript.csproj + dotnet publish ./src/HydraScript/HydraScript.csproj -o ./output -r ${{ matrix.config.rid }} -p:Version=${{ needs.create-release.outputs.publish_version }} - -o ./output - name: Rename Executable run: >- mv ./output/HydraScript${{ matrix.config.rid == 'win-x64' && '.exe' || '' }} @@ -87,6 +86,23 @@ jobs: repository: 'Stepami/hydrascript' milestone: ${{ needs.create-release.outputs.determined_version }} assets: ./output/hydrascript_${{ matrix.config.rid }}${{ matrix.config.rid == 'win-x64' && '.exe' || '' }} + - name: Pack rid-specific package + run: >- + dotnet pack ./src/HydraScript/HydraScript.csproj -c Release -o ./pack-rid-output -v n + -r ${{ matrix.config.rid }} + -p:Version=${{ needs.publish-release.outputs.publish_version }} + - name: NuGet login (OIDC → temp API key) + uses: NuGet/login@v1 + id: nuget_login + with: + user: ${{ secrets.NUGET_USER }} + - name: Publish rid-specific package to NuGet + run: >- + dotnet nuget push + ./pack-rid-output/HydraScript.${{ matrix.config.rid }}.${{ needs.publish-release.outputs.publish_version }}.nupkg + --skip-duplicate + --api-key ${{ steps.nuget_login.outputs.NUGET_API_KEY }} + --source "https://api.nuget.org/v3/index.json" publish-release: name: Publish release @@ -129,54 +145,25 @@ jobs: run: >- dotnet pack ./src/HydraScript/HydraScript.csproj -c Release -o ./pack-output -v n -p:Version=${{ needs.publish-release.outputs.publish_version }} - -p:PublishAot=false + - name: Pack any + run: >- + dotnet pack ./src/HydraScript/HydraScript.csproj -c Release -o ./pack-output -v n + -p:Version=${{ needs.publish-release.outputs.publish_version }} + -r any -p:PublishAot=false - name: NuGet login (OIDC → temp API key) uses: NuGet/login@v1 id: nuget_login with: user: ${{ secrets.NUGET_USER }} - - name: Publish + - name: Publish any run: >- - dotnet nuget push ./pack-output/HydraScript.${{ needs.publish-release.outputs.publish_version }}.nupkg + dotnet nuget push ./pack-output/HydraScript.any.${{ needs.publish-release.outputs.publish_version }}.nupkg --skip-duplicate --api-key ${{ steps.nuget_login.outputs.NUGET_API_KEY }} --source "https://api.nuget.org/v3/index.json" - - publish-rid-nuget: - name: Publish as runtime-specific dotnet tool to NuGet - needs: publish-release - strategy: - matrix: - config: - - os: ubuntu-latest - rid: linux-x64 - - os: macos-latest - rid: osx-arm64 - - os: windows-latest - rid: win-x64 - runs-on: ${{ matrix.config.os }} - steps: - - name: Checkout - uses: actions/checkout@v6 - - name: Setup .NET - uses: actions/setup-dotnet@v5 - with: - dotnet-version: 10.0.x - - name: Pack - run: >- - dotnet pack ./src/HydraScript/HydraScript.csproj - -c Release -o ./pack-rid-output -v n - -r ${{ matrix.config.rid }} - -p:Version=${{ needs.publish-release.outputs.publish_version }} - - name: NuGet login (OIDC → temp API key) - uses: NuGet/login@v1 - id: nuget_login - with: - user: ${{ secrets.NUGET_USER }} - name: Publish run: >- - dotnet nuget push - ./pack-rid-output/HydraScript.${{ matrix.config.rid }}.${{ needs.publish-release.outputs.publish_version }}.nupkg + dotnet nuget push ./pack-output/HydraScript.${{ needs.publish-release.outputs.publish_version }}.nupkg --skip-duplicate --api-key ${{ steps.nuget_login.outputs.NUGET_API_KEY }} --source "https://api.nuget.org/v3/index.json" \ No newline at end of file diff --git a/src/HydraScript/HydraScript.csproj b/src/HydraScript/HydraScript.csproj index 3f240bcc..90491196 100644 --- a/src/HydraScript/HydraScript.csproj +++ b/src/HydraScript/HydraScript.csproj @@ -3,7 +3,7 @@ Exe true - linux-x64;win-x64;osx-arm64; + any;linux-x64;win-x64;osx-arm64; true HydraScript TypeScript & Go inspired small interpreted programming language written in C#