Skip to content

Commit e558645

Browse files
authored
Update build_app.yaml
1 parent 0450f59 commit e558645

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/build_app.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,17 @@ env:
1010
jobs:
1111
release:
1212
runs-on: ubuntu-latest
13-
outputs:
14-
output: ${{ steps.get_latest_release.outputs.updated }}
1513
steps:
1614
- name: Get latest release
1715
id: get_latest_release
1816
run: |
19-
echo "updated=true" >> "$GITHUB_OUTPUT"
17+
echo "updated=true" >> "$GITHUB_ENV"
2018
if [[ "${{ github.ref_name }}" == "$(curl -s -u ${{ secrets.LIBRESCORE_USERNAME }}:${{ secrets.LIBRESCORE_TOKEN }} -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/LibreScore/${{ secrets.LIBRESCORE_REPO_A }}/releases/latest | jq --raw-output ".tag_name")" ]]; then
21-
echo "updated=false" >> "$GITHUB_OUTPUT"
19+
echo "updated=false" >> "$GITHUB_ENV"
2220
exit 1
2321
fi
2422
- name: Publish pre-release
25-
if: ${{ steps.get_latest_release.outputs.updated }} == 'true'
23+
if: env.updated == 'true'
2624
uses: softprops/action-gh-release@v1
2725
with:
2826
token: ${{ secrets.LIBRESCORE_TOKEN }}
@@ -238,7 +236,7 @@ Installation instructions are in the [README](https://github.com/LibreScore/${{
238236
runs-on: ubuntu-latest
239237
steps:
240238
- name: Delete pre-release
241-
if: ${{needs.release.outputs.updated}} == 'true'
239+
if: env.updated == 'true'
242240
run: |
243241
ID_A="$(curl -s -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.LIBRESCORE_TOKEN }}" https://api.github.com/repos/LibreScore/${{ secrets.LIBRESCORE_REPO_A }}/releases/tags/${{ github.ref_name }} | jq -r .id)"
244242
curl -s -X DELETE -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.LIBRESCORE_TOKEN }}" https://api.github.com/repos/LibreScore/${{ secrets.LIBRESCORE_REPO_A }}/releases/$ID_A
@@ -247,6 +245,6 @@ Installation instructions are in the [README](https://github.com/LibreScore/${{
247245
curl -s -X DELETE -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.LIBRESCORE_TOKEN }}" https://api.github.com/repos/LibreScore/${{ secrets.LIBRESCORE_REPO_B }}/releases/$ID_B
248246
curl -s -X DELETE -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.LIBRESCORE_TOKEN }}" https://api.github.com/repos/LibreScore/${{ secrets.LIBRESCORE_REPO_B }}/git/refs/tags/${{ github.ref_name }}
249247
- name: Delete workflow run
250-
if: ${{needs.release.outputs.updated}} == 'false'
248+
if: env.updated == 'false'
251249
run: |
252250
curl -s -i -u ${{ secrets.LIBRESCORE_USERNAME }}:${{ secrets.LIBRESCORE_TOKEN }} -d '{"event_type":"delete_action","client_payload":{"run_id":"'"${{ github.run_id }}"'","repo":"LibreScore/app-librescore"}}' -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/LibreScore/actions/dispatches

0 commit comments

Comments
 (0)