From 2813007b393243e5d5bc59bafa1d069ca17cc0e7 Mon Sep 17 00:00:00 2001 From: SkyrilHD Date: Sun, 19 Sep 2021 02:47:30 +0200 Subject: [PATCH 1/4] Put creating appcast into one job --- .github/workflows/main.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bee1ddf..7a65d13 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -70,22 +70,17 @@ jobs: file: build/*/*.dmg tag: ${{ github.ref }} file_glob: true - - appcast: - name: Set Appcast - needs: build - runs-on: macos-latest - env: - JOB_TYPE: BUILD - SIGNATURE_FOR_SIGNING: ${{ secrets.SIGNATURE_FOR_SIGNING }} - if: github.event_name == 'release' - steps: + - name: Get Sparkle 1.26 + if: github.event_name == 'release' && github.repository_owner == 'acidanthera' run: | curl -L -s "https://github.com/sparkle-project/Sparkle/releases/download/1.26.0/Sparkle-1.26.0.tar.xz" -o Sparkle.tar.xz || exit 1 tar -xf Sparkle.tar.xz || exit 1 - name: Get Information & Sign + if: github.event_name == 'release' && github.repository_owner == 'acidanthera' + env: + SIGNATURE_FOR_SIGNING: ${{ secrets.SIGNATURE_FOR_SIGNING }} run: | TAG_VER=${GITHUB_REF/refs\/tags\//} DATE=$(date -R) @@ -93,6 +88,7 @@ jobs: ./bin/generate_appcast -o appcast.xml -s ${{ secrets.SIGNATURE_FOR_SIGNING }} --download-url-prefix https://github.com/acidanthera/MaciASL/releases/download/${TAG_VER}/ build/Release || exit 1 - name: Commit Appcast + if: github.event_name == 'release' && github.repository_owner == 'acidanthera' run: | # The 41898282 identifier comes from the GitHub Actions API: https://api.github.com/users/github-actions%5Bbot%5D. git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" From 88d40d7d7cf4deb80ec3e617b0a6e13cd7a5e3ca Mon Sep 17 00:00:00 2001 From: SkyrilHD Date: Sun, 19 Sep 2021 02:52:30 +0200 Subject: [PATCH 2/4] remove indent --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7a65d13..07fa4c8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -70,7 +70,7 @@ jobs: file: build/*/*.dmg tag: ${{ github.ref }} file_glob: true - + - name: Get Sparkle 1.26 if: github.event_name == 'release' && github.repository_owner == 'acidanthera' run: | From b0a6f4170fccc22679f3971a17f887e012161d1d Mon Sep 17 00:00:00 2001 From: SkyrilHD Date: Sun, 19 Sep 2021 10:07:36 +0200 Subject: [PATCH 3/4] Update main.yml --- .github/workflows/main.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 07fa4c8..7473213 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,7 @@ jobs: chmod a+x appsign.sh || exit 1 - name: Compile with codesign (DEBUG) - if: github.repository_owner == 'acidanthera' + if: github.repository_owner == 'acidanthera' && github.event_name != 'pull_request' env: MAC_CERTIFICATE_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }} MAC_ACCOUNT_NAME: ${{ secrets.MAC_ACCOUNT_NAME }} @@ -40,7 +40,7 @@ jobs: run: DEPLOY_SCRIPT="$(pwd)/appsign.sh" xcodebuild -jobs 1 -configuration Debug - name: Compile with codesign (RELEASE) - if: github.repository_owner == 'acidanthera' + if: github.repository_owner == 'acidanthera' && github.event_name != 'pull_request' env: MAC_CERTIFICATE_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }} MAC_ACCOUNT_NAME: ${{ secrets.MAC_ACCOUNT_NAME }} @@ -48,22 +48,22 @@ jobs: run: DEPLOY_SCRIPT="$(pwd)/appsign.sh" xcodebuild -jobs 1 -configuration Release - name: Compile (DEBUG) - if: github.repository_owner != 'acidanthera' + if: github.repository_owner != 'acidanthera' || github.event_name == 'pull_request' run: xcodebuild -jobs 1 -configuration Debug - name: Compile (RELEASE) - if: github.repository_owner != 'acidanthera' + if: github.repository_owner != 'acidanthera' || github.event_name == 'pull_request' run: xcodebuild -jobs 1 -configuration Release - name: Upload to Artifacts - if: github.repository_owner == 'acidanthera' + if: github.repository_owner == 'acidanthera' && github.event_name != 'pull_request' uses: actions/upload-artifact@v2 with: name: Artifacts path: build/*/*.dmg - name: Upload to Release - if: github.event_name == 'release' && github.repository_owner == 'acidanthera' + if: github.event_name == 'release' && github.repository_owner == 'acidanthera' && github.event_name != 'pull_request' uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d with: repo_token: ${{ secrets.GITHUB_TOKEN }} @@ -72,15 +72,13 @@ jobs: file_glob: true - name: Get Sparkle 1.26 - if: github.event_name == 'release' && github.repository_owner == 'acidanthera' + if: github.event_name == 'release' && github.repository_owner == 'acidanthera' && github.event_name != 'pull_request' run: | curl -L -s "https://github.com/sparkle-project/Sparkle/releases/download/1.26.0/Sparkle-1.26.0.tar.xz" -o Sparkle.tar.xz || exit 1 tar -xf Sparkle.tar.xz || exit 1 - name: Get Information & Sign - if: github.event_name == 'release' && github.repository_owner == 'acidanthera' - env: - SIGNATURE_FOR_SIGNING: ${{ secrets.SIGNATURE_FOR_SIGNING }} + if: github.event_name == 'release' && github.repository_owner == 'acidanthera' && github.event_name != 'pull_request' run: | TAG_VER=${GITHUB_REF/refs\/tags\//} DATE=$(date -R) @@ -88,7 +86,7 @@ jobs: ./bin/generate_appcast -o appcast.xml -s ${{ secrets.SIGNATURE_FOR_SIGNING }} --download-url-prefix https://github.com/acidanthera/MaciASL/releases/download/${TAG_VER}/ build/Release || exit 1 - name: Commit Appcast - if: github.event_name == 'release' && github.repository_owner == 'acidanthera' + if: github.event_name == 'release' && github.repository_owner == 'acidanthera' && github.event_name != 'pull_request' run: | # The 41898282 identifier comes from the GitHub Actions API: https://api.github.com/users/github-actions%5Bbot%5D. git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" From b273a2ffbd326b04e926193328bfb2394d3943a9 Mon Sep 17 00:00:00 2001 From: SkyrilHD Date: Sun, 19 Sep 2021 10:53:08 +0200 Subject: [PATCH 4/4] Update main.yml --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7473213..a1bc63a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -63,7 +63,7 @@ jobs: path: build/*/*.dmg - name: Upload to Release - if: github.event_name == 'release' && github.repository_owner == 'acidanthera' && github.event_name != 'pull_request' + if: github.event_name == 'release' && github.repository_owner == 'acidanthera' uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d with: repo_token: ${{ secrets.GITHUB_TOKEN }} @@ -72,13 +72,13 @@ jobs: file_glob: true - name: Get Sparkle 1.26 - if: github.event_name == 'release' && github.repository_owner == 'acidanthera' && github.event_name != 'pull_request' + if: github.event_name == 'release' && github.repository_owner == 'acidanthera' run: | curl -L -s "https://github.com/sparkle-project/Sparkle/releases/download/1.26.0/Sparkle-1.26.0.tar.xz" -o Sparkle.tar.xz || exit 1 tar -xf Sparkle.tar.xz || exit 1 - name: Get Information & Sign - if: github.event_name == 'release' && github.repository_owner == 'acidanthera' && github.event_name != 'pull_request' + if: github.event_name == 'release' && github.repository_owner == 'acidanthera' run: | TAG_VER=${GITHUB_REF/refs\/tags\//} DATE=$(date -R) @@ -86,7 +86,7 @@ jobs: ./bin/generate_appcast -o appcast.xml -s ${{ secrets.SIGNATURE_FOR_SIGNING }} --download-url-prefix https://github.com/acidanthera/MaciASL/releases/download/${TAG_VER}/ build/Release || exit 1 - name: Commit Appcast - if: github.event_name == 'release' && github.repository_owner == 'acidanthera' && github.event_name != 'pull_request' + if: github.event_name == 'release' && github.repository_owner == 'acidanthera' run: | # The 41898282 identifier comes from the GitHub Actions API: https://api.github.com/users/github-actions%5Bbot%5D. git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"