From 9b3ad1555b9458d11215a1329aa5f58cc9fd5455 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Tue, 4 Mar 2025 20:34:59 +0800 Subject: [PATCH] Parallelize snapcraft push to the store --- .github/workflows/draft.yml | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/.github/workflows/draft.yml b/.github/workflows/draft.yml index 759437c3..7ea3047d 100644 --- a/.github/workflows/draft.yml +++ b/.github/workflows/draft.yml @@ -187,14 +187,6 @@ jobs: with: merge-multiple: true - - name: Push snap to latest/candidate channel - env: - SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }} - run: | - for x in *.snap; do - snapcraft push -v --release latest/candidate $x - done - - name: Draft uses: softprops/action-gh-release@v1 with: @@ -204,6 +196,12 @@ jobs: yazi-*.snap generate_release_notes: true + - name: Push snap to candidate channel + env: + SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }} + run: | + parallel 'snapcraft push -v --release latest/candidate {}' ::: *.snap + nightly: if: ${{ !startsWith(github.ref, 'refs/tags/') }} permissions: @@ -229,14 +227,6 @@ jobs: git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git tag --force nightly && git push --force origin tag nightly - - name: Push snap to latest/edge channel - env: - SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }} - run: | - for x in *.snap; do - snapcraft push -v --release latest/edge $x - done - - name: Nightly uses: softprops/action-gh-release@v1 with: @@ -248,3 +238,9 @@ jobs: name: Nightly Build body: ${{ env.NIGHTLY_BODY }} target_commitish: ${{ github.sha }} + + - name: Push snap to edge channel + env: + SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }} + run: | + parallel 'snapcraft push -v --release latest/edge {}' ::: *.snap