diff --git a/.github/workflows/notify-dev-site.yml b/.github/workflows/notify-dev-site.yml deleted file mode 100644 index b3a930be6..000000000 --- a/.github/workflows/notify-dev-site.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Create Dev Site Issue On Release - -on: - release: - types: [created] - -# Allow only one concurrent deployment,but do NOT cancel in-progress runs as -# we want to allow issue creation to complete. -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: false - -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 = `Web5 JS ${context.payload.release.tag_name} released`; - const issueBody = `Please check the TBD Developer Site docs for compatibility with the release and update accordingly.\n\n[Click to view release notes](${context.payload.release.html_url})`; - const labels = ['triage', 'BLOCKER']; - github.rest.issues.create({ - owner: 'TBD54566975', - repo: 'developer.tbd.website', - title: issueTitle, - body: issueBody, - labels: labels - }); diff --git a/.github/workflows/release-notify.yml b/.github/workflows/release-notify.yml new file mode 100644 index 000000000..dffbc8632 --- /dev/null +++ b/.github/workflows/release-notify.yml @@ -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/action-discord@0.3.2 + 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."