Skip to content

Commit

Permalink
ci: automate publishing to cloudsmith
Browse files Browse the repository at this point in the history
  • Loading branch information
mrexox committed Nov 18, 2024
1 parent f53894f commit 3e709a8
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ jobs:
uses: dawidd6/action-homebrew-bump-formula@v3
with:
formula: lefthook
token: ${{secrets.HOMEBREW_TOKEN}}
token: ${{ secrets.HOMEBREW_TOKEN }}

publish-winget:
needs: build
Expand All @@ -163,3 +163,33 @@ jobs:
identifier: evilmartians.lefthook
fork-user: mrexox
token: ${{ secrets.WINGET_TOKEN }}

publish-distro-packages:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/download-artifact@v4
with:
name: dist
- run: tar -xvf dist.tar

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: python -m pip install --upgrade cloudsmith-cli

- name: Push packages to Cloudsmith
env:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
run: |
cloudsmith push deb evilmartians/lefthook/distro/release dist/lefthook_*_amd64.deb
cloudsmith push deb evilmartians/lefthook/distro/release dist/lefthook_*_arm64.deb
cloudsmith push rpm evilmartians/lefthook/distro/release dist/lefthook_*_amd64.rpm
cloudsmith push rpm evilmartians/lefthook/distro/release dist/lefthook_*_arm64.rpm
cloudsmith push alpine evilmartians/lefthook/distro/release dist/lefthook_*_amd64.apk
cloudsmith push alpine evilmartians/lefthook/distro/release dist/lefthook_*_arm64.apk

0 comments on commit 3e709a8

Please sign in to comment.