Skip to content

Commit

Permalink
i have no idea what I am doing here rn
Browse files Browse the repository at this point in the history
  • Loading branch information
EchterAlsFake committed Jun 7, 2024
1 parent 6a2458f commit e927315
Show file tree
Hide file tree
Showing 5 changed files with 166 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build_cli_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,39 @@ jobs:
draft: false
prerelease: true

- name: Get current release body
id: get_release_body
run: |
if gh release view v${{ secrets.VERSION }}-automated-${{ env.GITHUB_SHA_SHORT }} >/dev/null 2>&1; then
gh release view v${{ secrets.VERSION }}-automated-${{ env.GITHUB_SHA_SHORT }} --json body --jq .body > current_body.txt
CURRENT_BODY=$(cat current_body.txt)
echo "CURRENT_BODY<<EOF" >> $GITHUB_ENV
echo "$CURRENT_BODY" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
else
echo "CURRENT_BODY=" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
shell: bash

- name: Append new SHA512 hash to release body
id: append_release_body
run: |
NEW_BODY="${CURRENT_BODY}\n- PornFetch_${{ matrix.os }}_${{ matrix.arch }}: ${{ steps.calculate_sha.outputs.sha }}"
echo "NEW_BODY<<EOF" >> $GITHUB_ENV
echo "$NEW_BODY" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
env:
CURRENT_BODY: ${{ env.CURRENT_BODY }}

- name: Update GitHub release
run: |
gh release edit v${{ secrets.VERSION }}-automated-${{ env.GITHUB_SHA_SHORT }} --notes "$NEW_BODY"
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
NEW_BODY: ${{ env.NEW_BODY }}
shell: bash

- name: Get Release Upload URL
id: get_release_url
run: |
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/build_cli_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,39 @@ jobs:
draft: false
prerelease: true

- name: Get current release body
id: get_release_body
run: |
if gh release view v${{ secrets.VERSION }}-automated-${{ env.GITHUB_SHA_SHORT }} >/dev/null 2>&1; then
gh release view v${{ secrets.VERSION }}-automated-${{ env.GITHUB_SHA_SHORT }} --json body --jq .body > current_body.txt
CURRENT_BODY=$(cat current_body.txt)
echo "CURRENT_BODY<<EOF" >> $GITHUB_ENV
echo "$CURRENT_BODY" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
else
echo "CURRENT_BODY=" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
shell: bash

- name: Append new SHA512 hash to release body
id: append_release_body
run: |
NEW_BODY="${CURRENT_BODY}\n- PornFetch_${{ matrix.os }}_${{ matrix.arch }}: ${{ steps.calculate_sha.outputs.sha }}"
echo "NEW_BODY<<EOF" >> $GITHUB_ENV
echo "$NEW_BODY" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
env:
CURRENT_BODY: ${{ env.CURRENT_BODY }}

- name: Update GitHub release
run: |
gh release edit v${{ secrets.VERSION }}-automated-${{ env.GITHUB_SHA_SHORT }} --notes "$NEW_BODY"
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
NEW_BODY: ${{ env.NEW_BODY }}
shell: bash

- name: Get Release Upload URL
id: get_release_url
run: |
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/build_gui_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,39 @@ jobs:
draft: false
prerelease: true

- name: Get current release body
id: get_release_body
run: |
if gh release view v${{ secrets.VERSION }}-automated-${{ env.GITHUB_SHA_SHORT }} >/dev/null 2>&1; then
gh release view v${{ secrets.VERSION }}-automated-${{ env.GITHUB_SHA_SHORT }} --json body --jq .body > current_body.txt
CURRENT_BODY=$(cat current_body.txt)
echo "CURRENT_BODY<<EOF" >> $GITHUB_ENV
echo "$CURRENT_BODY" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
else
echo "CURRENT_BODY=" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
shell: bash

- name: Append new SHA512 hash to release body
id: append_release_body
run: |
NEW_BODY="${CURRENT_BODY}\n- PornFetch_${{ matrix.os }}_${{ matrix.arch }}: ${{ steps.calculate_sha.outputs.sha }}"
echo "NEW_BODY<<EOF" >> $GITHUB_ENV
echo "$NEW_BODY" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
env:
CURRENT_BODY: ${{ env.CURRENT_BODY }}

- name: Update GitHub release
run: |
gh release edit v${{ secrets.VERSION }}-automated-${{ env.GITHUB_SHA_SHORT }} --notes "$NEW_BODY"
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
NEW_BODY: ${{ env.NEW_BODY }}
shell: bash

- name: Get Release Upload URL
id: get_release_url
run: |
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/build_gui_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,40 @@ jobs:
draft: false
prerelease: true

- name: Get current release body
id: get_release_body
run: |
if gh release view v${{ secrets.VERSION }}-automated-${{ env.GITHUB_SHA_SHORT }} >/dev/null 2>&1; then
gh release view v${{ secrets.VERSION }}-automated-${{ env.GITHUB_SHA_SHORT }} --json body --jq .body > current_body.txt
CURRENT_BODY=$(cat current_body.txt)
echo "CURRENT_BODY<<EOF" >> $GITHUB_ENV
echo "$CURRENT_BODY" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
else
echo "CURRENT_BODY=" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
shell: bash

- name: Append new SHA512 hash to release body
id: append_release_body
run: |
NEW_BODY="${CURRENT_BODY}\n- PornFetch_${{ matrix.os }}_${{ matrix.arch }}: ${{ steps.calculate_sha.outputs.sha }}"
echo "NEW_BODY<<EOF" >> $GITHUB_ENV
echo "$NEW_BODY" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
env:
CURRENT_BODY: ${{ env.CURRENT_BODY }}

- name: Update GitHub release
run: |
gh release edit v${{ secrets.VERSION }}-automated-${{ env.GITHUB_SHA_SHORT }} --notes "$NEW_BODY"
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
NEW_BODY: ${{ env.NEW_BODY }}
shell: bash


- name: Get Release Upload URL
id: get_release_url
run: |
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/build_gui_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,39 @@ jobs:
draft: false
prerelease: true

- name: Get current release body
id: get_release_body
run: |
if gh release view v${{ secrets.VERSION }}-automated-${{ env.GITHUB_SHA_SHORT }} >/dev/null 2>&1; then
gh release view v${{ secrets.VERSION }}-automated-${{ env.GITHUB_SHA_SHORT }} --json body --jq .body > current_body.txt
CURRENT_BODY=$(cat current_body.txt)
echo "CURRENT_BODY<<EOF" >> $GITHUB_ENV
echo "$CURRENT_BODY" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
else
echo "CURRENT_BODY=" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
shell: bash

- name: Append new SHA512 hash to release body
id: append_release_body
run: |
NEW_BODY="${CURRENT_BODY}\n- PornFetch_${{ matrix.os }}_${{ matrix.arch }}: ${{ steps.calculate_sha.outputs.sha }}"
echo "NEW_BODY<<EOF" >> $GITHUB_ENV
echo "$NEW_BODY" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
env:
CURRENT_BODY: ${{ env.CURRENT_BODY }}

- name: Update GitHub release
run: |
gh release edit v${{ secrets.VERSION }}-automated-${{ env.GITHUB_SHA_SHORT }} --notes "$NEW_BODY"
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
NEW_BODY: ${{ env.NEW_BODY }}
shell: bash

- name: Get Release Upload URL
id: get_release_url
run: |
Expand Down

0 comments on commit e927315

Please sign in to comment.