From 09c2841d1c4eceb11389656840ac0a3673f80ee4 Mon Sep 17 00:00:00 2001 From: Al Date: Thu, 19 Sep 2024 19:49:55 +0200 Subject: [PATCH] chore: minor patches in cd pipeline (#573) * chore: updating upload artifact task for snap * chore: re introduce workflow dispatch * chore: adding app based auth --- .../workflows/publish-release-packages.yaml | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-release-packages.yaml b/.github/workflows/publish-release-packages.yaml index fe9216c7..ede64e5a 100644 --- a/.github/workflows/publish-release-packages.yaml +++ b/.github/workflows/publish-release-packages.yaml @@ -26,12 +26,43 @@ on: default: true type: boolean description: "Publish to Winget repository" + workflow_dispatch: + inputs: + artifactName: + required: true + type: string + description: "The github artifact holding the wheel file which will be published" + release_version: + required: true + type: string + description: "The release version that will be published (e.g. 0.1.0)" + do_brew: + required: false + default: true + type: boolean + description: "Publish to brew repository" + do_snap: + required: false + default: true + type: boolean + description: "Publish to snap repository" + do_winget: + required: false + default: true + type: boolean + description: "Publish to Winget repository" jobs: publish-brew: runs-on: ubuntu-latest if: ${{ inputs.do_brew }} steps: + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ secrets.ALGOKIT_GH_BOT_ID }} + private-key: ${{ secrets.ALGOKIT_GH_BOT_SK }} + - name: Checkout source code uses: actions/checkout@v4 @@ -51,7 +82,7 @@ jobs: - name: Update homebrew cask run: scripts/update-brew-cask.sh "dist/algokit*-py3-none-any.whl" "dist/algokit*-macos_arm64-brew.tar.gz" "dist/algokit*-macos_x64-brew.tar.gz" "algorandfoundation/homebrew-tap" env: - TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }} + TAP_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} publish-winget: runs-on: windows-latest @@ -90,7 +121,7 @@ jobs: ./scripts/snap/create-snapcraft-yaml.sh ${{ github.workspace }} ${{ inputs.release_version }} ${{ env.BINARY_PATH }} "stable" - name: Upload snapcraft.yaml as reference artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: snapcraft-yaml path: ${{ github.workspace }}/snap/snapcraft.yaml