Skip to content

Commit

Permalink
Move release nots in workflow to Slack job
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Nov 6, 2023
1 parent 0505413 commit 61b4b20
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,6 @@ jobs:
outputs:
version: ${{ steps.get-version.outputs.VERSION }}

release-notes:
runs-on: ubuntu-latest
needs:
- check
steps:
- uses: actions/checkout@v3
- name: Get release notes
id: get-release-notes
run: |
RELEASE_NOTES=$(./tasks/get-release-notes.sh "${{ needs.check.outputs.version }}")
echo $RELEASE_NOTES
echo "RELEASE_NOTES=$RELEASE_NOTES" >> "$GITHUB_OUTPUT"
outputs:
release-notes: ${{ steps.get-release-notes.outputs.RELEASE_NOTES }}

lint:
runs-on: ubuntu-latest
needs:
Expand Down Expand Up @@ -109,13 +94,19 @@ jobs:
runs-on: ubuntu-latest
needs:
- check
- release-notes
- publish-npm
steps:
- uses: actions/checkout@v3
- name: Get release notes
id: get-release-notes
run: |
RELEASE_NOTES=$(./tasks/get-release-notes.sh "${{ needs.check.outputs.version }}")
echo $RELEASE_NOTES
echo "RELEASE_NOTES=$RELEASE_NOTES" >> "$GITHUB_OUTPUT"
- uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: "`v${{ needs.check.outputs.version }}` of `tna-frontend` has just been published"
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_ICON: "https://raw.githubusercontent.com/nationalarchives/tna-frontend/main/src/nationalarchives/assets/images/apple-touch-icon.png"
MSG_MINIMAL: true
SLACK_MESSAGE: ${{ needs.release-notes.outputs.release-notes }}
SLACK_MESSAGE: ${{ env.RELEASE_NOTES }}

0 comments on commit 61b4b20

Please sign in to comment.