mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-22 13:22:28 +00:00
Update pre-release.yaml
This commit is contained in:
parent
6e5513ad52
commit
5a89ec4670
27
.github/workflows/pre-release.yaml
vendored
27
.github/workflows/pre-release.yaml
vendored
|
@ -25,17 +25,6 @@ jobs:
|
||||||
echo "version=$version" >> $GITHUB_ENV
|
echo "version=$version" >> $GITHUB_ENV
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Get Latest Release
|
|
||||||
id: get_latest_release
|
|
||||||
uses: octokit/request-action@v2.x
|
|
||||||
with:
|
|
||||||
route: GET /repos/{owner}/{repo}/releases/latest
|
|
||||||
owner: ${{ github.repository_owner }}
|
|
||||||
repo: ${{ github.event.repository.name }}
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Generate Release Notes
|
- name: Generate Release Notes
|
||||||
id: generate_notes
|
id: generate_notes
|
||||||
uses: release-drafter/release-drafter@v5
|
uses: release-drafter/release-drafter@v5
|
||||||
|
@ -48,20 +37,10 @@ jobs:
|
||||||
- name: Prepare Release Body
|
- name: Prepare Release Body
|
||||||
id: prepare_body
|
id: prepare_body
|
||||||
run: |
|
run: |
|
||||||
latest_release_body="${{ fromJson(steps.get_latest_release.outputs.data).body }}"
|
|
||||||
new_changes="${{ steps.generate_notes.outputs.body }}"
|
new_changes="${{ steps.generate_notes.outputs.body }}"
|
||||||
if [[ -z "$latest_release_body" ]]; then
|
echo "body<<EOF" >> $GITHUB_OUTPUT
|
||||||
echo "body<<EOF" >> $GITHUB_OUTPUT
|
echo "$new_changes" >> $GITHUB_OUTPUT
|
||||||
echo "$new_changes" >> $GITHUB_OUTPUT
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
echo "EOF" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "body<<EOF" >> $GITHUB_OUTPUT
|
|
||||||
echo "$new_changes" >> $GITHUB_OUTPUT
|
|
||||||
echo "" >> $GITHUB_OUTPUT
|
|
||||||
echo "Previous Release Notes:" >> $GITHUB_OUTPUT
|
|
||||||
echo "$latest_release_body" >> $GITHUB_OUTPUT
|
|
||||||
echo "EOF" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Create and Upload Release
|
- name: Create and Upload Release
|
||||||
id: create_release
|
id: create_release
|
||||||
|
|
Loading…
Reference in New Issue
Block a user