Skip to content

Commit c288ad5

Browse files
committed
chore: try republish winget
1 parent 1e0e39c commit c288ad5

File tree

1 file changed

+4
-129
lines changed

1 file changed

+4
-129
lines changed
Lines changed: 4 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,13 @@
11
name: Publish packages to public repositories
22

33
on:
4-
workflow_call:
5-
inputs:
6-
artifactName:
7-
required: true
8-
type: string
9-
description: "The github artifact holding the wheel file which will be published"
10-
release_version:
11-
required: true
12-
type: string
13-
description: "The release version that will be published (e.g. 0.1.0)"
14-
do_brew:
15-
required: false
16-
default: true
17-
type: boolean
18-
description: "Publish to brew repository"
19-
do_snap:
20-
required: false
21-
default: true
22-
type: boolean
23-
description: "Publish to snap repository"
24-
do_winget:
25-
required: false
26-
default: true
27-
type: boolean
28-
description: "Publish to Winget repository"
29-
workflow_dispatch:
30-
inputs:
31-
artifactName:
32-
required: true
33-
type: string
34-
description: "The github artifact holding the wheel file which will be published"
35-
release_version:
36-
required: true
37-
type: string
38-
description: "The release version that will be published (e.g. 0.1.0)"
39-
do_brew:
40-
required: false
41-
default: true
42-
type: boolean
43-
description: "Publish to brew repository"
44-
do_snap:
45-
required: false
46-
default: true
47-
type: boolean
48-
description: "Publish to snap repository"
49-
do_winget:
50-
required: false
51-
default: true
52-
type: boolean
53-
description: "Publish to Winget repository"
4+
push:
5+
branches:
6+
- winget-release
547

558
jobs:
56-
publish-brew:
57-
runs-on: ubuntu-latest
58-
if: ${{ inputs.do_brew }}
59-
steps:
60-
- uses: actions/create-github-app-token@v1
61-
id: app-token
62-
with:
63-
app-id: ${{ secrets.BOT_ID }}
64-
private-key: ${{ secrets.BOT_SK }}
65-
repositories: homebrew-tap
66-
owner: algorandfoundation
67-
68-
- name: Checkout source code
69-
uses: actions/checkout@v4
70-
71-
- name: Download wheel from release
72-
run: gh release download v${{ inputs.release_version }} --pattern "*.whl" --dir dist
73-
env:
74-
GH_TOKEN: ${{ github.token }}
75-
76-
- name: Download binary artifact from release
77-
run: gh release download v${{ inputs.release_version }} --pattern "*-brew.tar.gz" --dir dist
78-
env:
79-
GH_TOKEN: ${{ github.token }}
80-
81-
- name: Set Git user as GitHub actions
82-
run: git config --global user.email "[email protected]" && git config --global user.name "github-actions"
83-
84-
- name: Update homebrew cask
85-
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"
86-
env:
87-
TAP_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
88-
899
publish-winget:
9010
runs-on: windows-latest
91-
if: ${{ inputs.do_winget }}
9211
steps:
9312
- name: Checkout source code
9413
uses: actions/checkout@v4
@@ -100,48 +19,4 @@ jobs:
10019
run: |
10120
echo 'Publishing to winget'
10221
& .\scripts\winget\update-package.ps1 `
103-
-releaseVersion '${{ inputs.release_version }}'
104-
105-
publish-snap:
106-
runs-on: ubuntu-latest
107-
if: ${{ inputs.do_snap }}
108-
109-
steps:
110-
- name: Checkout source code
111-
uses: actions/checkout@v4
112-
113-
- name: Download binary artifact from release
114-
run: |
115-
gh release download v${{ inputs.release_version }} --pattern "*-snap.tar.gz" --dir dist
116-
BINARY_PATH=$(ls dist/*-snap.tar.gz)
117-
echo "BINARY_PATH=$BINARY_PATH" >> $GITHUB_ENV
118-
env:
119-
GH_TOKEN: ${{ github.token }}
120-
121-
- name: Generate snapcraft.yaml
122-
run: |
123-
./scripts/snap/create-snapcraft-yaml.sh ${{ github.workspace }} ${{ inputs.release_version }} ${{ env.BINARY_PATH }} "stable"
124-
125-
- name: Upload snapcraft.yaml as reference artifact
126-
uses: actions/upload-artifact@v4
127-
with:
128-
name: snapcraft-yaml
129-
path: ${{ github.workspace }}/snap/snapcraft.yaml
130-
131-
- name: Build snap
132-
uses: snapcore/action-build@v1
133-
with:
134-
snapcraft-args: --target-arch amd64
135-
136-
- name: Set path to snap binary
137-
shell: bash
138-
run: |
139-
echo "SNAP_BINARY_PATH=$(find ${{ github.workspace }} -name '*.snap')" >> $GITHUB_ENV
140-
141-
- name: Publish snap
142-
uses: snapcore/action-publish@v1
143-
env:
144-
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_RELEASE_TOKEN }}
145-
with:
146-
snap: ${{ env.SNAP_BINARY_PATH }}
147-
release: stable
22+
-releaseVersion '2.5.1'

0 commit comments

Comments
 (0)