Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: automate publishing to cloudsmith #875

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading