Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate release announcements. #2167

Merged
merged 1 commit into from
Jul 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 38 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,51 @@ jobs:
uses: pantsbuild/actions/run-tox@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb
with:
tox-env: package
- name: Prepare Changelog
id: prepare-changelog
uses: a-scie/actions/changelog@v1.5
with:
changelog-file: ${{ github.workspace }}/CHANGES.md
version: ${{ needs.determine-tag.outputs.release-version }}
- name: Create ${{ needs.determine-tag.outputs.release-tag }} Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.determine-tag.outputs.release-tag }}
name: pex ${{ needs.determine-tag.outputs.release-version }}
body: |
---

## ${{ needs.determine-tag.outputs.release-version }}

TODO: Add CHANGES.rst entries.
body_path: ${{ steps.prepare-changelog.outputs.changelog-file }}
draft: false
prerelease: false
files: dist/pex
fail_on_unmatched_files: true
discussion_category_name: Announcements
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created the Announcements GH discussions category just now.

announce-release:
name: Announce Release
needs:
- determine-tag
- pypi
- github-release
runs-on: ubuntu-22.04
steps:
- name: Post Release Announcement to Pants Slack `#announce`
id: slack
uses: slackapi/slack-github-action@v1.23.0
with:
channel-id: "C18RRR4JK"
# N.B.: You can muck with the JSON blob and see the results rendered here:
# https://app.slack.com/block-kit-builder
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Pex ${{ needs.determine-tag.outputs.release-version }} is released:\n* https://pypi.org/project/pex/${{ needs.determine-tag.outputs.release-version }}/\n* https://github.com/pantsbuild/pex/releases/tag/${{ needs.determine-tag.outputs.release-tag }}"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added pantsbuild/pex to the list of repos this org secret is exposed to.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, you noticed I added it at the org level. This should mean we can delete it from scie-pants, but I wanted to test first.

Loading