Agent Post Release #77
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Agent Post Release | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: ["Create Release"] | |
types: | |
- completed | |
jobs: | |
update-rpm-and-docs: | |
# Check if this was a manual invocation*workflow_dispatch) or triggered(workflow_run) and successful | |
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run && github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [lts/*] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# The script `publish-docs` below needs to perform a merge, so | |
# it needs the full history to perform this merge. | |
fetch-depth: 0 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install Dependencies | |
run: npm ci | |
- name: Setup GitHub Credentials | |
run: | | |
git config user.name $GITHUB_ACTOR | |
git config user.email gh-actions-${GITHUB_ACTOR}@github.com | |
- name: Get Created Tag | |
id: get_tag | |
run: echo "latest_tag=$(cat package.json | jq .version)" >> $GITHUB_OUTPUT | |
- name: Update system configuration pages | |
run: node ./bin/update-system-config-pages.js --version ${{ steps.get_tag.outputs.latest_tag }} --staging-key ${{ secrets.NEW_RELIC_API_KEY_STAGING }} --prod-key ${{ secrets.NEW_RELIC_API_KEY_PRODUCTION }} | |
- name: Publish API Docs | |
run: npm run publish-docs | |
- name: Create Docs Website PR | |
run: node ./bin/create-docs-pr.js --tag v${{ steps.get_tag.outputs.latest_tag }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.NODE_AGENT_GH_TOKEN }} | |
GITHUB_USER: ${{ secrets.NODE_AGENT_CI_USER_NAME }} | |
GITHUB_EMAIL: ${{ secrets.NODE_AGENT_CI_USER_EMAIL }} |