Skip to content

Commit

Permalink
Update and rename notify-dev-site.yml to release-notify.yml (#118)
Browse files Browse the repository at this point in the history
Will notify discord and issues that there is a new release, in case there are to be docs changes.
  • Loading branch information
michaelneale authored Jun 9, 2023
1 parent dd83cec commit e2357b0
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 32 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/notify-dev-site.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/release-notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Create Issue On Release

on:
release:
types: [created]

jobs:
create-issue:
runs-on: ubuntu-latest

steps:
- name: Create Issue
uses: actions/github-script@v6
with:
github-token: ${{ secrets.DOCS_PAT }} # Assuming 'PAT' is your Personal Access Token stored as a secret
script: |
const issueTitle = `A new release ${context.payload.release.tag_name} just cut for ${context.payload.repository.name}.`;
const issueBody = `Please check the api docs for compatibility with the release. Here is the [link to release notes](${context.payload.release.html_url}).`;
const labels = ['triage', 'priority-1-blocker', 'documentation'];
const issue = await github.rest.issues.create({
owner: 'TBD54566975',
repo: 'developer.tbd.website',
title: issueTitle,
body: issueBody,
labels: labels
});
return { issueNumber: issue.data.number, releaseTag: context.payload.release.tag_name, repo: context.payload.repository.name };
- name: Notify Discord
uses: Ilshidur/[email protected]
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: "A new release {{ EVENT_PAYLOAD.release.tag_name }} of project {{ EVENT_PAYLOAD.repository.name }} has been cut. Please check the release notes: {{ EVENT_PAYLOAD.release.html_url }} for compatibility with docs."

0 comments on commit e2357b0

Please sign in to comment.