From 282e0c343098451763af05f50e9601db4206050b Mon Sep 17 00:00:00 2001 From: RandomGuyJCI Date: Sat, 18 Jan 2020 21:52:28 +0800 Subject: [PATCH] Only build release for graphic pack changes hotfix (#421) by RandomGuyJCI This also adds Artifacts which are stored for 90 days (unfortunately). I wish we could avoid the Github Release tags somehow. --- .github/workflows/build.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 36e3b56f..4873df0b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,9 +5,6 @@ on: push: branches: - master - pull_request: - branches: - - master paths: - 'Enhancements/**' - 'Resolutions/**' @@ -23,7 +20,8 @@ jobs: # Build script steps: # Clone latest copy of repository - - uses: actions/checkout@v1 + - name: Checkout repository + uses: actions/checkout@v1 with: fetch-depth: 1 - name: Zip all packs @@ -43,3 +41,8 @@ jobs: jq -n --arg releaseTag "Github$RELEASE_NUMBER" --arg releaseTitle "Cemu Graphic Packs: V$RELEASE_NUMBER" --arg releaseBody "$(git log -1 --format='Commited at %ci by **%cn** in commit %h%n### %s%n```%n%b%n```%n')" '{"tag_name":$releaseTag,"target_commitish": "master","name": $releaseTitle,"body": $releaseBody,"draft": false,"prerelease": false}' > releaseBody.json ; RELEASE_ID=$(curl -X POST -H 'Content-Type:application/json' -H "Authorization: Bearer $GITHUB_TOKEN" "https://api.github.com/repos/$GITHUB_REPOSITORY/releases" -d "@releaseBody.json" | jq -r ".id") ; curl -X POST -H 'Content-Type:application/json' -H "Authorization: Bearer $GITHUB_TOKEN" "https://uploads.github.com/repos/$GITHUB_REPOSITORY/releases/$RELEASE_ID/assets?name=graphicPacks$RELEASE_NUMBER.zip" --upload-file "graphicPacks.zip" + - name: Upload artifact + uses: actions/upload-artifact@v1 + with: + name: graphicPacks.zip + path: "graphicPacks.zip"