Remove github workflows
DELETE
.github/workflows/add-assets-to-release.yaml
-name: Add assets to release
-on:
- release:
- types: [published]
-env:
- VERSION: ${{ github.event.release.name }} #Can't use GITHUB_REF because it starts with a "v"
-jobs:
- dd-java-agent:
- runs-on: ubuntu-latest
- steps:
- - name: Download from jcenter
- run: |
- wget https://oss.jfrog.org/artifactory/oss-release-local/com/datadoghq/dd-java-agent/$VERSION/dd-java-agent-$VERSION.jar
- - name: Upload to release
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ github.event.release.upload_url }}
- asset_path: dd-java-agent-${{ env.VERSION }}.jar
- asset_name: dd-java-agent-${{ env.VERSION }}.jar
- asset_content_type: application/java-archive
- dd-trace-api:
- runs-on: ubuntu-latest
- steps:
- - name: Download from jcenter
- run: |
- wget https://oss.jfrog.org/artifactory/oss-release-local/com/datadoghq/dd-trace-api/$VERSION/dd-trace-api-$VERSION.jar
- - name: Upload to release
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ github.event.release.upload_url }}
- asset_path: dd-trace-api-${{ env.VERSION }}.jar
- asset_name: dd-trace-api-${{ env.VERSION }}.jar
- asset_content_type: application/java-archive
- dd-trace-ot:
- runs-on: ubuntu-latest
- steps:
- - name: Download from jcenter
- run: |
- wget https://oss.jfrog.org/artifactory/oss-release-local/com/datadoghq/dd-trace-ot/$VERSION/dd-trace-ot-$VERSION.jar
- - name: Upload to release
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ github.event.release.upload_url }}
- asset_path: dd-trace-ot-${{ env.VERSION }}.jar
- asset_name: dd-trace-ot-${{ env.VERSION }}.jar
- asset_content_type: application/java-archive
\ No newline at end of file

DELETE
.github/workflows/add-milestone-to-pull-requests.yml
-name: Add milestone to pull requests
-on:
- pull_request:
- types: [closed]
- branches:
- - master
-
-jobs:
- add_milestone_to_merged:
- if: github.event.pull_request.merged && github.event.pull_request.milestone == null
- name: Add milestone to merged pull requests
- runs-on: ubuntu-latest
- steps:
- - name: Get project milestones
- id: milestones
- uses: actions/github-script@0.9.0
- with:
- github-token: ${{secrets.GITHUB_TOKEN}}
- script: |
- const list = await github.issues.listMilestonesForRepo({
- owner: context.repo.owner,
- repo: context.repo.repo,
- state: 'open'
- })
- // Need to manually sort because "sort by number" isn't part of the api
- // highest number first
- const milestones = list.data.sort((a,b) => (b.number - a.number))
-
- return milestones.length == 0 ? null : milestones[0].number
- - name: Update Pull Request
- if: steps.milestones.outputs.result != null
- uses: actions/github-script@0.9.0
- with:
- github-token: ${{secrets.GITHUB_TOKEN}}
- script: |
- // Confusingly, the issues api is used because pull requests are issues
- await github.issues.update({
- owner: context.repo.owner,
- repo: context.repo.repo,
- issue_number: ${{ github.event.pull_request.number }},
- milestone: ${{ steps.milestones.outputs.result }},
- });

DELETE
.github/workflows/create-next-milestone.yml
-name: Create next milestone
-on:
- milestone:
- types: [closed]
-
-jobs:
- create_next_milestone:
- runs-on: ubuntu-latest
- steps:
- - name: Get next minor version
- id: semvers
- uses: WyriHaximus/github-action-next-semvers@0.1.0
- with:
- version: ${{ github.event.milestone.title }}
- - name: Create next milestone
- uses: WyriHaximus/github-action-create-milestone@0.1.0
- with:
- title: ${{ steps.semvers.outputs.minor }}
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file

DELETE
.github/workflows/draft-release-notes-on-milestone-close.yaml
-name: Create draft release notes
-on:
- milestone:
- types: [closed]
-
-jobs:
- draft_release_notes:
- runs-on: ubuntu-latest
- steps:
- - name: Get pull requests for milestone
- id: pullsA
- uses: actions/github-script@0.9.0
- with:
- github-token: ${{secrets.GITHUB_TOKEN}}
- script: |
- const options = github.pulls.list.endpoint.merge({
- owner: context.repo.owner,
- repo: context.repo.repo,
- state: 'closed'
- })
-
- const pullRequests = await github.paginate(options)
-
- return pullRequests.filter(pullRequest => pullRequest.merged_at
- && pullRequest.milestone
- && pullRequest.milestone.number == ${{ github.event.milestone.number }})
- - name: Generate release notes text
- id: generate
- uses: actions/github-script@0.9.0
- with:
- github-token: ${{secrets.GITHUB_TOKEN}}
- script: |
- var draftText = "# Improvements \n\n# Changes \n\n"
- for (let pull of ${{ steps.pullsA.outputs.result }}) {
- draftText += "* " + pull.title + " #" + pull.number + " \n"
- }
- draftText += "\n# Fixes \n"
- return draftText
- - name: Create release notes draft
- uses: actions/github-script@0.9.0
- with:
- github-token: ${{secrets.GITHUB_TOKEN}}
- script: |
- await github.repos.createRelease({
- owner: context.repo.owner,
- repo: context.repo.repo,
- tag_name: 'v' + '${{ github.event.milestone.title }}',
- name: '${{ github.event.milestone.title}}',
- draft: true,
- body: ${{ steps.generate.outputs.result }}
- })
\ No newline at end of file

DELETE
.github/workflows/update-issues-on-release.yaml
-name: Update issues on release
-on:
- release:
- types: [published]
-
-jobs:
- update_issues:
- runs-on: ubuntu-latest
- steps:
- - name: Get milestone for release
- id: milestone
- uses: actions/github-script@0.9.0
- with:
- github-token: ${{secrets.GITHUB_TOKEN}}
- script: |
- const options = github.issues.listMilestonesForRepo.endpoint.merge({
- owner: context.repo.owner,
- repo: context.repo.repo,
- state: 'all'
- })
-
- const milestones = await github.paginate(options)
-
- return milestones.find( milestone => milestone.title == "${{github.event.release.name}}" ).number
- - name: Get issues for milestone
- id: issues
- uses: actions/github-script@0.9.0
- with:
- github-token: ${{secrets.GITHUB_TOKEN}}
- script: |
- const options = github.issues.listForRepo.endpoint.merge({
- owner: context.repo.owner,
- repo: context.repo.repo,
- state: 'all',
- milestone: ${{steps.milestone.outputs.result}}
- })
-
- const issues = await github.paginate(options)
-
- // Pull requests are issues so filter them out
- return issues.filter( issue => !issue["pull_request"] )
- - name: Comment and close issues
- uses: actions/github-script@0.9.0
- with:
- github-token: ${{secrets.GITHUB_TOKEN}}
- script: |
- for (let issue of ${{ steps.issues.outputs.result }}) {
- // This can be parallelized better by moving the await but it might trip rate limits
- await github.issues.createComment({
- owner: context.repo.owner,
- repo: context.repo.repo,
- issue_number: issue.number,
- body: ':robot: This issue has been addressed in the latest release. See full details in the [Release Notes]( ${{ github.event.release.html_url }}).'
- })
-
- await github.issues.update({
- owner: context.repo.owner,
- repo: context.repo.repo,
- issue_number: issue.number,
- state: 'closed'
- })
- }

Remove github workflows (#346)