File tree Expand file tree Collapse file tree 2 files changed +31
-20
lines changed
Expand file tree Collapse file tree 2 files changed +31
-20
lines changed Original file line number Diff line number Diff line change @@ -70,22 +70,31 @@ jobs:
7070
7171
7272 # Find the tag name for the release by its name
73- tag_name=$(echo "$releases" | jq -r '.[] | select(.name == "internal") | .tag_name' | cat)
74-
75- # Edit the release using its tag name
76- if [[ "$tag_name" != "" ]]
77- then
78- gh release delete "$tag_name" --yes
79- fi
73+ tag_name=$(echo "$releases" | jq -r '.[] | select(.name == "build") | .tag_name' | sed 's/\\n//g' | sort -n -r | head -n 1)
8074
8175
8276 # Find the tag name for the release by its name
83- tag_name=$(echo "$releases" | jq -r '.[] | select(.name == "build") | .tag_name')
84- body=$(echo "$releases" | jq -r '.[] | select(.name == "build") | .body' | tr -dc 'a-zA-Z0-9.:\=\_\-/%+\ \n')
77+ body=$(echo "$releases" | jq -r '.[] | select(.tag_name == "$tag_name") | .body' | tr -dc 'a-zA-Z0-9.:\=\_\-/%+\ \n')
8578
8679 # Edit the release using its tag name
8780 _safeEcho "$body" | gh release edit "$tag_name" --title "internal" --notes -
8881 env :
8982 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9083
84+ # - name: Setup upterm session
85+ # if: ${{ failure() }}
86+ # uses: lhotari/action-upterm@v1
87+ # with:
88+ # ## limits ssh access and adds the ssh public key for the user which triggered the workflow
89+ # limit-access-to-actor: true
90+ # ## limits ssh access and adds the ssh public keys of the listed GitHub users
91+ # # DANGER: Discouraged. Prefer 'limit-access-to-actor' instead.
92+ # #limit-access-to-users: githubuser1,githubuser2
93+ # timeout-minutes: 320
94+ # env:
95+ # GH_TOKEN: ${{ github.token }}
96+
97+
98+
99+
91100
Original file line number Diff line number Diff line change 66# ATTRIBUTION-AI - Largely attributable to ChatGPT GPT-4 2023-06-26 .
77
88
9-
10-
119name : _renameTag-internal_to_internal-date
1210
1311
@@ -71,22 +69,26 @@ jobs:
7169
7270
7371 # Find the tag name for the release by its name
74- tag_name=$(echo "$releases" | jq -r ".[] | select(.name == \"internal-$(date +'%Y-%m-%d')\") | .tag_name" | cat)
75-
76- # Edit the release using its tag name
77- if [[ "$tag_name" != "" ]]
78- then
79- gh release delete "$tag_name" --yes
80- fi
72+ tag_name=$(echo "$releases" | jq -r '.[] | select(.name == "internal") | .tag_name' | sed 's/\\n//g' | sort -n -r | head -n 1)
8173
8274
8375 # Find the tag name for the release by its name
84- tag_name=$(echo "$releases" | jq -r '.[] | select(.name == "internal") | .tag_name')
85- body=$(echo "$releases" | jq -r '.[] | select(.name == "internal") | .body' | tr -dc 'a-zA-Z0-9.:\=\_\-/%+\ \n')
76+ body=$(echo "$releases" | jq -r '.[] | select(.tag_name == "$tag_name") | .body' | tr -dc 'a-zA-Z0-9.:\=\_\-/%+\ \n')
8677
8778 # Edit the release using its tag name
8879 _safeEcho "$body" | gh release edit "$tag_name" --title "internal"-$(date +'%Y-%m-%d') --notes -
8980 env :
9081 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9182
9283
84+
85+
86+
87+
88+
89+
90+
91+
92+
93+
94+
You can’t perform that action at this time.
0 commit comments