Fix CLI release workflow more (#740)
This commit is contained in:
parent
aa0bf1c24f
commit
f65a0d21ba
|
@ -17,8 +17,8 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
cli_version: ${{ steps.version.outputs.cli_version }}
|
cli_version: ${{ steps.version.outputs.cli_version }}
|
||||||
release_notes: ${{ fromJSON(steps.notes.outputs.notes_json) }}
|
release_notes: ${{ fromJSON(steps.notes.outputs.notes_json || 'null') }}
|
||||||
announce: ${{ steps.announce.outputs.announce }}
|
announce: ${{ steps.announce.outputs.announce || '' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Extract version
|
- name: Extract version
|
||||||
|
@ -37,6 +37,7 @@ jobs:
|
||||||
echo "cli_version=$version" >> $GITHUB_OUTPUT
|
echo "cli_version=$version" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Extract release notes
|
- name: Extract release notes
|
||||||
|
if: github.event.head_commit.message
|
||||||
id: notes
|
id: notes
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
|
@ -45,7 +46,13 @@ jobs:
|
||||||
release_commit: ${{ github.event.head_commit.message }}
|
release_commit: ${{ github.event.head_commit.message }}
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
release_pr=$(head -n1 <<< "${release_commit:-}" | grep -oP '(?<=[(]#)\d+(?=[)])')
|
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
|
if [[ -z "$release_pr" ]]; then
|
||||||
echo "notes_json=null" >> $GITHUB_OUTPUT
|
echo "notes_json=null" >> $GITHUB_OUTPUT
|
||||||
exit
|
exit
|
||||||
|
@ -184,7 +191,7 @@ jobs:
|
||||||
${{ runner.os }}-cargo-${{ matrix.target }}-
|
${{ runner.os }}-cargo-${{ matrix.target }}-
|
||||||
${{ runner.os }}-cargo-
|
${{ runner.os }}-cargo-
|
||||||
|
|
||||||
- run: apt update
|
- run: sudo apt update
|
||||||
if: startsWith(matrix.os, 'ubuntu-')
|
if: startsWith(matrix.os, 'ubuntu-')
|
||||||
- name: Add musl tools
|
- name: Add musl tools
|
||||||
run: sudo apt install -y musl musl-dev musl-tools
|
run: sudo apt install -y musl musl-dev musl-tools
|
||||||
|
@ -308,8 +315,8 @@ jobs:
|
||||||
- name: Dist manifest
|
- name: Dist manifest
|
||||||
run: |
|
run: |
|
||||||
jq -ncf .github/workflows/dist-manifest.jq \
|
jq -ncf .github/workflows/dist-manifest.jq \
|
||||||
--arg version "{{ needs.info.outputs.cli_version }}" \
|
--arg version "${{ needs.info.outputs.cli_version }}" \
|
||||||
--arg changelog "{{ needs.info.outputs.release_notes }}" \
|
--arg changelog "${{ needs.info.outputs.release_notes }}" \
|
||||||
--arg files "$(ls watchexec-*)" \
|
--arg files "$(ls watchexec-*)" \
|
||||||
> dist-manifest.json
|
> dist-manifest.json
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue