From 850d095819e4b8e3e3049acd6546ad6d9143f666 Mon Sep 17 00:00:00 2001 From: corentin Date: Thu, 14 Mar 2024 11:17:14 +0100 Subject: [PATCH] debug release notes and win binary --- .github/workflows/publish-release.yml | 228 +++++++++++++------------- 1 file changed, 113 insertions(+), 115 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 51f18cf996..4372cb67e2 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -33,6 +33,8 @@ jobs: body: releaseNotes.body, }) + console.log(releaseNotes.body) + await core.summary .addHeading('Draft release created') .addRaw('Find it here: ') @@ -47,41 +49,41 @@ jobs: return release.id - build-binary-ubuntu: - runs-on: ubuntu-latest - needs: create-draft-release - steps: - - uses: actions/checkout@v4 - - name: Install node - uses: actions/setup-node@v4 - with: - node-version: '14.18.3' - - name: Install project dependencies - run: yarn install --immutable - - name: Bundle library - run: yarn build - - name: Create standalone binary - run: yarn dist-standalone -t node14-linux-x64 -o datadog-ci_linux-x64 - - name: Remove dist folder to check that binary can stand alone - run: | - rm -rf dist - rm -rf src - - name: Test generated standalone binary - run: yarn dist-standalone:test - - name: Upload release asset - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const fs = require("fs").promises + # build-binary-ubuntu: + # runs-on: ubuntu-latest + # needs: create-draft-release + # steps: + # - uses: actions/checkout@v4 + # - name: Install node + # uses: actions/setup-node@v4 + # with: + # node-version: '14.18.3' + # - name: Install project dependencies + # run: yarn install --immutable + # - name: Bundle library + # run: yarn build + # - name: Create standalone binary + # run: yarn dist-standalone -t node14-linux-x64 -o datadog-ci_linux-x64 + # - name: Remove dist folder to check that binary can stand alone + # run: | + # rm -rf dist + # rm -rf src + # - name: Test generated standalone binary + # run: yarn dist-standalone:test + # - name: Upload release asset + # uses: actions/github-script@v7 + # with: + # github-token: ${{ secrets.GITHUB_TOKEN }} + # script: | + # const fs = require("fs").promises - github.rest.repos.uploadReleaseAsset({ - owner: context.repo.owner, - repo: context.repo.repo, - release_id: "${{ needs.create-draft-release.outputs.release-id }}", - name: 'datadog-ci_linux-x64', - data: await fs.readFile('./datadog-ci_linux-x64'), - }) + # github.rest.repos.uploadReleaseAsset({ + # owner: context.repo.owner, + # repo: context.repo.repo, + # release_id: "${{ needs.create-draft-release.outputs.release-id }}", + # name: 'datadog-ci_linux-x64', + # data: await fs.readFile('./datadog-ci_linux-x64'), + # }) build-binary-windows: runs-on: windows-latest @@ -100,6 +102,7 @@ jobs: run: yarn dist-standalone -t node14-win-x64 -o datadog-ci_win-x64 - name: Remove dist folder to check that binary can stand alone run: | + ls rm dist -r rm src -r - name: Test generated standalone binary @@ -118,85 +121,80 @@ jobs: name: 'datadog-ci_win-x64', data: await fs.readFile('./datadog-ci_win-x64'), }) - - build-binary-macos: - runs-on: macos-latest - needs: create-draft-release - steps: - - uses: actions/checkout@v4 - - name: Install node - uses: actions/setup-node@v4 - with: - node-version: '14.18.3' - - name: Install project dependencies - run: yarn install --immutable - - name: Bundle library - run: yarn build - - name: Create standalone binary - run: yarn dist-standalone -t node14-macos-x64 -o datadog-ci_darwin-x64 - - name: Remove dist folder to check that binary can stand alone - run: | - rm -rf dist - rm -rf src - - name: Test generated standalone binary - run: yarn dist-standalone:test - - name: Upload release asset - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const fs = require("fs").promises - - github.rest.repos.uploadReleaseAsset({ - owner: context.repo.owner, - repo: context.repo.repo, - release_id: "${{ needs.create-draft-release.outputs.release-id }}", - name: 'datadog-ci_darwin-x64', - data: await fs.readFile('./datadog-ci_darwin-x64'), - }) - + # build-binary-macos: + # runs-on: macos-latest + # needs: create-draft-release + # steps: + # - uses: actions/checkout@v4 + # - name: Install node + # uses: actions/setup-node@v4 + # with: + # node-version: '14.18.3' + # - name: Install project dependencies + # run: yarn install --immutable + # - name: Bundle library + # run: yarn build + # - name: Create standalone binary + # run: yarn dist-standalone -t node14-macos-x64 -o datadog-ci_darwin-x64 + # - name: Remove dist folder to check that binary can stand alone + # run: | + # rm -rf dist + # rm -rf src + # - name: Test generated standalone binary + # run: yarn dist-standalone:test + # - name: Upload release asset + # uses: actions/github-script@v7 + # with: + # github-token: ${{ secrets.GITHUB_TOKEN }} + # script: | + # const fs = require("fs").promises + # github.rest.repos.uploadReleaseAsset({ + # owner: context.repo.owner, + # repo: context.repo.repo, + # release_id: "${{ needs.create-draft-release.outputs.release-id }}", + # name: 'datadog-ci_darwin-x64', + # data: await fs.readFile('./datadog-ci_darwin-x64'), + # }) # Requires an approval - npm-publish: - runs-on: ubuntu-latest - environment: npm - needs: [build-binary-ubuntu, build-binary-windows, build-binary-macos] - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: '14' - - run: yarn - - run: yarn npm publish - env: - YARN_NPM_AUTH_TOKEN: ${{ secrets.YARN_NPM_AUTH_TOKEN }} - - bump-ci-integrations: - name: Bump datadog-ci in integration - runs-on: ubuntu-latest - needs: npm-publish - strategy: - fail-fast: false - matrix: - integration: - - synthetics-ci-github-action - - datadog-ci-azure-devops - - synthetics-test-automation-circleci-orb - - synthetics-test-automation-bitrise-step-run-tests - - synthetics-test-automation-bitrise-step-upload-application - steps: - - name: Create bump datadog-ci PR - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.CROSS_REPOSITORY_GITHUB_TOKEN }} - script: | - const tagName = '${{ github.event.release.tag_name }}'.replace('v', '') - - github.rest.actions.createWorkflowDispatch({ - owner: context.repo.owner, - repo: '${{ matrix.integration }}', - workflow_id: 'bump-datadog-ci.yml', - ref: 'main', - inputs: { - datadog_ci_version: tagName, - }, - }) + # npm-publish: + # runs-on: ubuntu-latest + # environment: npm + # needs: [build-binary-ubuntu, build-binary-windows, build-binary-macos] + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-node@v4 + # with: + # node-version: '14' + # - run: yarn + # - run: yarn npm publish + # env: + # YARN_NPM_AUTH_TOKEN: ${{ secrets.YARN_NPM_AUTH_TOKEN }} + # bump-ci-integrations: + # name: Bump datadog-ci in integration + # runs-on: ubuntu-latest + # needs: npm-publish + # strategy: + # fail-fast: false + # matrix: + # integration: + # - synthetics-ci-github-action + # - datadog-ci-azure-devops + # - synthetics-test-automation-circleci-orb + # - synthetics-test-automation-bitrise-step-run-tests + # - synthetics-test-automation-bitrise-step-upload-application + # steps: + # - name: Create bump datadog-ci PR + # uses: actions/github-script@v7 + # with: + # github-token: ${{ secrets.CROSS_REPOSITORY_GITHUB_TOKEN }} + # script: | + # const tagName = '${{ github.event.release.tag_name }}'.replace('v', '') + # github.rest.actions.createWorkflowDispatch({ + # owner: context.repo.owner, + # repo: '${{ matrix.integration }}', + # workflow_id: 'bump-datadog-ci.yml', + # ref: 'main', + # inputs: { + # datadog_ci_version: tagName, + # }, + # })