Skip to content

Commit

Permalink
debug release notes and win binary
Browse files Browse the repository at this point in the history
  • Loading branch information
Drarig29 committed Mar 14, 2024
1 parent 37df564 commit 850d095
Showing 1 changed file with 113 additions and 115 deletions.
228 changes: 113 additions & 115 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
body: releaseNotes.body,
})
console.log(releaseNotes.body)
await core.summary
.addHeading('Draft release created')
.addRaw('Find it here: ')
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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,
# },
# })

0 comments on commit 850d095

Please sign in to comment.