Skip to content

Commit

Permalink
chore: minor patches in cd pipeline (#573)
Browse files Browse the repository at this point in the history
* chore: updating upload artifact task for snap

* chore: re introduce workflow dispatch

* chore: adding app based auth
  • Loading branch information
aorumbayev authored Sep 19, 2024
1 parent 532a897 commit 09c2841
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions .github/workflows/publish-release-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 09c2841

Please sign in to comment.