-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build a draft release and then publish once complete
- Loading branch information
Showing
1 changed file
with
28 additions
and
12 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,33 +94,49 @@ jobs: | |
' | ||
cargo run -p package -- --dest-dir dist/ scie \ | ||
--scie-pants dist/scie-pants --tools-pex dist/tools.pex | ||
# Build up a draft release with the artifacts from each of these jobs: | ||
- 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 }} | ||
draft: true | ||
# placeholder body to help someone track down why a release is still in draft: | ||
body: "Release job in progress: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
files: dist/scie-pants-* | ||
fail_on_unmatched_files: true | ||
|
||
publish-announce-release: | ||
name: Publish and Announce Release | ||
needs: | ||
- determine-tag | ||
- github-release | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
# Now, do the human-facing prep on the release (changelog etc.), and publish it | ||
- name: Prepare Changelog | ||
id: prepare-changelog | ||
uses: a-scie/actions/[email protected] | ||
with: | ||
changelog-file: ${{ github.workspace }}/CHANGES.md | ||
version: ${{ needs.determine-tag.outputs.release-version }} | ||
setup-python: ${{ matrix.os == 'ubuntu-22.04' }} | ||
- name: Create ${{ needs.determine-tag.outputs.release-tag }} Release | ||
setup-python: true | ||
|
||
- name: Publish ${{ 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: scie-pants ${{ needs.determine-tag.outputs.release-version }} | ||
tag_name: ${{ needs.determine-tag.outputs.release-tag }} | ||
body_path: ${{ steps.prepare-changelog.outputs.changelog-file }} | ||
draft: false | ||
prerelease: ${{ needs.determine-tag.outputs.prerelease }} | ||
files: dist/scie-pants-* | ||
fail_on_unmatched_files: true | ||
discussion_category_name: Announcements | ||
announce-release: | ||
name: Announce Release | ||
needs: | ||
- determine-tag | ||
- github-release | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
|
||
# Announce the release! Yay | ||
- name: Post Release Announcement to Pants Slack `#announce` | ||
if: ${{ needs.determine-tag.outputs.prerelease != 'true' }} | ||
id: slack | ||
|