From c3c5324ece19e33acae1dd3195cb93a8f1190275 Mon Sep 17 00:00:00 2001 From: Chris Simon Date: Wed, 4 Sep 2024 22:42:24 +1000 Subject: [PATCH] ci: revert temporary publishing exclusions while manually fixing v1.12.0 publishing errors --- .github/workflows/contextive-publish.yml | 65 ++++++++------- .../workflows/contextive-runtime-publish.yml | 79 +++++++++---------- src/language-server/build.fsx | 11 ++- src/vscode/build.fsx | 10 +-- 4 files changed, 77 insertions(+), 88 deletions(-) diff --git a/.github/workflows/contextive-publish.yml b/.github/workflows/contextive-publish.yml index 260ff34b..4230a61a 100644 --- a/.github/workflows/contextive-publish.yml +++ b/.github/workflows/contextive-publish.yml @@ -3,12 +3,12 @@ on: release: types: [published] ## Keeping in Comments as may be helpful for future publish-rescue requirements - workflow_dispatch: - inputs: - release: - description: 'Release to publish' - required: true - type: string + # workflow_dispatch: + # inputs: + # release: + # description: 'Release to publish' + # required: true + # type: string env: @@ -27,8 +27,8 @@ jobs: matrix: ${{ fromJSON(needs.get-matrix.outputs.matrix) }} uses: ./.github/workflows/contextive-runtime-publish.yml with: - # release: ${{ github.ref_name }} - release: ${{ inputs.release }} # Use this if switching to manual publish + release: ${{ github.ref_name }} + # release: ${{ inputs.release }} # Use this if switching to manual publish dotnet_runtime: ${{ matrix.dotnet_runtime }} os: ${{ matrix.os }} vsce_platform: ${{ matrix.vsce_platform }} @@ -37,32 +37,29 @@ jobs: VSCE_PAT: ${{ secrets.VSCE_PAT }} OVSX_PAT: ${{ secrets.OVSX_PAT }} -# Temporary Manually skipped as was already published on first run: https://github.com/dev-cycles/contextive/actions/runs/10701042363/job/29666246138 - # publish-intellij: - # name: Contextive IntelliJ Publish - # runs-on: 'ubuntu-latest' - # steps: - # - uses: actions/checkout@v4 - # with: - # persist-credentials: false + publish-intellij: + name: Contextive IntelliJ Publish + runs-on: 'ubuntu-latest' + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false - # - uses: ./.github/actions/init-dotnet - - # - uses: actions/setup-java@v4 - # with: - # distribution: 'corretto' - # java-version: '21' - - # - name: Build - # id: build - # run: dotnet fsi intellij/build.fsx -- --release ${{ github.ref_name }} - # # run: dotnet fsi intellij/build.fsx -- --release ${{ inputs.release }} # Use this if switching to manual publishg - # working-directory: src - # env: - # GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - # CERTIFICATE_CHAIN: ${{ secrets.JETBRAINS_CERTIFICATE_CHAIN }} - # PRIVATE_KEY: ${{ secrets.JETBRAINS_PRIVATE_KEY }} - # PRIVATE_KEY_PASSWORD: ${{ secrets.JETBRAINS_PRIVATE_KEY_PASSWORD }} - # PUBLISH_TOKEN: ${{ secrets.JETBRAINS_PUBLISH_TOKEN }} + - uses: ./.github/actions/init-dotnet + - uses: actions/setup-java@v4 + with: + distribution: 'corretto' + java-version: '21' + - name: Build + id: build + run: dotnet fsi intellij/build.fsx -- --release ${{ github.ref_name }} + # run: dotnet fsi intellij/build.fsx -- --release ${{ inputs.release }} # Use this if switching to manual publishg + working-directory: src + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + CERTIFICATE_CHAIN: ${{ secrets.JETBRAINS_CERTIFICATE_CHAIN }} + PRIVATE_KEY: ${{ secrets.JETBRAINS_PRIVATE_KEY }} + PRIVATE_KEY_PASSWORD: ${{ secrets.JETBRAINS_PRIVATE_KEY_PASSWORD }} + PUBLISH_TOKEN: ${{ secrets.JETBRAINS_PUBLISH_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/contextive-runtime-publish.yml b/.github/workflows/contextive-runtime-publish.yml index 54b3b66c..e8ccf489 100644 --- a/.github/workflows/contextive-runtime-publish.yml +++ b/.github/workflows/contextive-runtime-publish.yml @@ -32,57 +32,52 @@ jobs: with: matrix-path: .github/release-matrix.yml -# Temporary Manually skipped as was already published on -# first run: https://github.com/dev-cycles/contextive/actions/runs/10701042363 - # language-server: - # name: Language Server - # runs-on: ${{ inputs.os }} - # steps: - # - uses: actions/checkout@v4 - # with: - # persist-credentials: false + language-server: + name: Language Server + runs-on: ${{ inputs.os }} + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false - # - uses: ./.github/actions/init-dotnet + - uses: ./.github/actions/init-dotnet - # - name: Build - # id: build - # run: dotnet fsi language-server/build.fsx -- -r ${{ inputs.dotnet_runtime }} --release ${{ inputs.release }} - # working-directory: src - # env: - # GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + - name: Build + id: build + run: dotnet fsi language-server/build.fsx -- -r ${{ inputs.dotnet_runtime }} --release ${{ inputs.release }} + working-directory: src + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} -# Temporary Manually skipped as was already published on -# MS VS Marketplace first run: https://github.com/dev-cycles/contextive/actions/runs/10701042363 -# OSVX Marketplace second run: https://github.com/dev-cycles/contextive/actions/runs/10701382779 - # vscode: - # name: VsCode Extension - # needs: - # - language-server - # runs-on: ${{ inputs.os }} - # steps: - # - uses: actions/checkout@v4 - # with: - # persist-credentials: false + vscode: + name: VsCode Extension + needs: + - language-server + runs-on: ${{ inputs.os }} + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false - # - uses: ./.github/actions/init-dotnet - # - uses: actions/setup-node@v4 - # with: - # node-version: 20 + - uses: ./.github/actions/init-dotnet + - uses: actions/setup-node@v4 + with: + node-version: 20 - # - name: Build - # id: build - # run: dotnet fsi vscode/build.fsx -- -r ${{ inputs.dotnet_runtime }} --release ${{ inputs.release }} --vsce-platform ${{ inputs.vsce_platform }} - # working-directory: src - # env: - # GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - # VSCE_PAT: ${{ secrets.VSCE_PAT }} - # OVSX_PAT: ${{ secrets.OVSX_PAT }} + - name: Build + id: build + run: dotnet fsi vscode/build.fsx -- -r ${{ inputs.dotnet_runtime }} --release ${{ inputs.release }} --vsce-platform ${{ inputs.vsce_platform }} + working-directory: src + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + VSCE_PAT: ${{ secrets.VSCE_PAT }} + OVSX_PAT: ${{ secrets.OVSX_PAT }} publish-visualstudio: name: Visual Studio Extension if: ${{ inputs.os == 'windows-latest' }} - # needs: - # - language-server + needs: + - language-server runs-on: ${{ inputs.os }} steps: - uses: actions/checkout@v4 diff --git a/src/language-server/build.fsx b/src/language-server/build.fsx index e0d00ce4..f5ef709b 100644 --- a/src/language-server/build.fsx +++ b/src/language-server/build.fsx @@ -88,13 +88,12 @@ let zipAndUploadAsset app = run (fun ctx -> bashCmd $"""echo "artifact-path={appZipPath app ctx}" >> $GITHUB_OUTPUT""") } - // Temporary Manually skipped as was already uploaded on first run: https://github.com/dev-cycles/contextive/actions/runs/10701042363/job/29666246138 - // stage "Upload" { - // workingDir app.Path - // whenCmdArg args.release + stage "Upload" { + workingDir app.Path + whenCmdArg args.release - // run (fun ctx -> $"gh release upload {ctx.GetCmdArg(args.release)} {appZipPath app ctx}") - // } + run (fun ctx -> $"gh release upload {ctx.GetCmdArg(args.release)} {appZipPath app ctx}") + } } } diff --git a/src/vscode/build.fsx b/src/vscode/build.fsx index 6aff2e91..d6a867a9 100644 --- a/src/vscode/build.fsx +++ b/src/vscode/build.fsx @@ -129,13 +129,11 @@ pipeline "Contextive VsCode Extension" { whenCmdArg args.release whenCmdArg args.vscePlatform - // Temporary Manually skipped as was already uploaded on first run: https://github.com/dev-cycles/contextive/actions/runs/10701042363/job/29666246138 - // stage "Upload Asset" { - // run (fun ctx -> $"gh release upload {ctx.GetCmdArg(args.release)} {vsCodeAssetFileName ctx}") - // } + stage "Upload Asset" { + run (fun ctx -> $"gh release upload {ctx.GetCmdArg(args.release)} {vsCodeAssetFileName ctx}") + } - // Temporary Manually skipped as was already published on first run: https://github.com/dev-cycles/contextive/actions/runs/10701042363/job/29666246138 - // stage "Publish to Microsoft VS Marketplace" { run (fun ctx -> $"npx vsce publish --packagePath {vsCodeAssetFileName ctx}") } + stage "Publish to Microsoft VS Marketplace" { run (fun ctx -> $"npx vsce publish --packagePath {vsCodeAssetFileName ctx}") } stage "Publish to Open-Vsx Marketplace" { run (fun ctx -> $"npx ovsx publish {vsCodeAssetFileName ctx} -p \"{ctx.GetEnvVar(args.ovsxPat.Name)}\"") } }