Skip to content

Commit

Permalink
ci: parallelize publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
mrexox committed Oct 17, 2024
1 parent 75be8c8 commit 7eb4eb6
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:
contents: write

jobs:
goreleaser:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -49,6 +49,31 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}

- name: Preserve artifacts permissions with tar
run: tar -cvf dist.tar dist/
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist.tar

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

- name: Fetch all tags
run: git fetch --force --tags

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

- name: Publish to NPM, Rubygems and PyPI
env:
NPM_API_KEY: ${{ secrets.NPM_API_KEY }}
Expand Down Expand Up @@ -80,12 +105,20 @@ jobs:
ruby pack.rb prepare
ruby pack.rb publish
publish-homebrew:
needs: build
runs-on: ubuntu-latest
steps:
- name: Update Homebrew formula
uses: dawidd6/action-homebrew-bump-formula@v3
with:
formula: lefthook
token: ${{secrets.HOMEBREW_TOKEN}}

publish-winget:
needs: build
runs-on: ubuntu-latest
steps:
- name: Publish to Winget
uses: vedantmgoyal2009/winget-releaser@v2
with:
Expand Down

0 comments on commit 7eb4eb6

Please sign in to comment.