Remove more PR machinery

This commit is contained in:
Félix Saparelli 2024-04-21 01:02:40 +12:00
parent d317540fd3
commit 86d6c7d448
No known key found for this signature in database
1 changed files with 0 additions and 39 deletions

View File

@ -16,8 +16,6 @@ jobs:
runs-on: ubuntu-latest
outputs:
cli_version: ${{ steps.version.outputs.cli_version }}
release_notes: ${{ fromJSON(steps.notes.outputs.notes_json || 'null') }}
announce: ${{ steps.announce.outputs.announce || '' }}
steps:
- uses: actions/checkout@v4
- name: Extract version
@ -35,40 +33,6 @@ jobs:
echo "cli_version=$version" >> $GITHUB_OUTPUT
- name: Extract release notes
if: github.event.head_commit.message
id: notes
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPO: ${{ github.repository }}
release_commit: ${{ github.event.head_commit.message }}
run: |
set -x
set +eo pipefail
if [[ -z "$release_commit" ]]; then
echo "notes_json=null" >> $GITHUB_OUTPUT
exit
fi
release_pr=$(head -n1 <<< "$release_commit" | grep -oP '(?<=[(]#)\d+(?=[)])')
if [[ -z "$release_pr" ]]; then
echo "notes_json=null" >> $GITHUB_OUTPUT
exit
fi
gh \
pr --repo "$GITHUB_REPO" \
view "$release_pr" \
--json body \
--jq '"notes_json=\((.body | split("### Release notes")[1] // "") | tojson)"' \
>> $GITHUB_OUTPUT
- name: Make a new announcement post
id: announce
if: endsWith(steps.version.outputs.cli_version, '.0')
run: echo "announce=Announcements" >> $GITHUB_OUTPUT
build:
strategy:
matrix:
@ -315,7 +279,6 @@ jobs:
run: |
jq -ncf .github/workflows/dist-manifest.jq \
--arg version "${{ needs.info.outputs.cli_version }}" \
--arg changelog "${{ needs.info.outputs.release_notes }}" \
--arg files "$(ls watchexec-*)" \
> dist-manifest.json
@ -337,9 +300,7 @@ jobs:
with:
tag_name: v${{ needs.info.outputs.cli_version }}
name: CLI v${{ needs.info.outputs.cli_version }}
body: ${{ needs.info.outputs.release_notes }}
append_body: true
discussion_category_name: ${{ needs.info.outputs.announce }}
files: |
dist-manifest.json
watchexec-*.tar.xz