Skip to content

move docs job

move docs job #1

Workflow file for this run

name: Releases
on:
push:
branches:
- v3.x
- v4.x
- v5.x
- workflow_dispatch
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:

Check failure on line 15 in .github/workflows/releases.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/releases.yml

Invalid workflow file

You have an error in your yaml syntax on line 15
publish-v3:
if: github.event_name == 'push' && github.event.ref == 'refs/heads/v3.x'
runs-on: ubuntu-latest
environment:
name: npm-latest-node14
url: https://npmjs.com/package/dd-trace
permissions:
id-token: write
contents: write
pull-requests: read
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ./.github/actions/node
- run: npm publish --tag latest-node14
- id: pkg
run: |
content=`cat ./package.json | tr '\n' ' '`
echo "json=$content" >> $GITHUB_OUTPUT
- run: |
git tag v${{ fromJson(steps.pkg.outputs.json).version }}
git push origin v${{ fromJson(steps.pkg.outputs.json).version }}
- run: node scripts/release/notes
publish-v4:
if: github.event_name == 'push' && github.event.ref == 'refs/heads/v4.x'
runs-on: ubuntu-latest
environment:
name: npm-latest-node16
url: https://npmjs.com/package/dd-trace
permissions:
id-token: write
contents: write
pull-requests: read
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ./.github/actions/node
- run: npm publish --tag latest-node16
- id: pkg
run: |
content=`cat ./package.json | tr '\n' ' '`
echo "json=$content" >> $GITHUB_OUTPUT
- run: |
git tag v${{ fromJson(steps.pkg.outputs.json).version }}
git push origin v${{ fromJson(steps.pkg.outputs.json).version }}
- run: node scripts/release/notes
publish-latest:
if: github.event_name == 'push' && github.event.ref == 'refs/heads/v5.x'
runs-on: ubuntu-latest
environment:
name: npm-latest
url: https://npmjs.com/package/dd-trace
permissions:
id-token: write
contents: write
pull-requests: read
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ./.github/actions/node
- run: npm publish
- id: pkg
run: |
content=`cat ./package.json | tr '\n' ' '`
echo "json=$content" >> $GITHUB_OUTPUT
- run: |
git tag v${{ fromJson(steps.pkg.outputs.json).version }}
git push origin v${{ fromJson(steps.pkg.outputs.json).version }}
- run: node scripts/release/notes --latest
docs:
needs: 'publish-latest'
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ./.github/actions/node
- id: pkg
run: |
content=`cat ./package.json | tr '\n' ' '`
echo "json=$content" >> $GITHUB_OUTPUT
- run: yarn
- name: Build
working-directory: docs
run: |
yarn
yarn build
mv out /tmp/out
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: gh-pages
- name: Deploy
run: |
rm -rf *
mv /tmp/out/* .
git config user.name github-actions
git config user.email github-actions@github.com
git add -A
git commit -m ${{ fromJson(steps.pkg.outputs.json).version }}
git push
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
publish-dev:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
environment:
name: npm-dev
url: https://npmjs.com/package/dd-trace
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ./.github/actions/node
- uses: ./.github/actions/install
- id: pkg
run: |
content=`cat ./package.json | tr '\n' ' '`
echo "json=$content" >> $GITHUB_OUTPUT
- run: npm version --no-git-tag-version ${{ fromJson(steps.pkg.outputs.json).version }}-$(git rev-parse --short HEAD)+${{ github.run_id }}.${{ github.run_attempt }}
- run: npm publish --tag dev
- run: |
git tag --force dev
git push origin :refs/tags/dev
git push origin --tags
status:
needs: ['publish-latest']
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
pull-requests: read
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
- run: node scripts/release/status