Skip to content

Commit

Permalink
feat: Ensure all package builds depend on build-and-release
Browse files Browse the repository at this point in the history
This commit updates the GitHub Actions workflow to ensure that all package build jobs (deb, rpm, alpine, arch, snap, nix) depend on the `build-and-release` job. This ensures that the release assets are created before the packages are built, preventing potential errors. Additionally, the upload URL is now passed as an environment variable to the upload step.
  • Loading branch information
suenot committed Feb 1, 2025
1 parent 1591577 commit 1e2f820
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 16 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ jobs:
git push
build-deb-package:
needs: build-linux-x86
needs: [build-and-release, build-linux-x86]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -386,14 +386,15 @@ jobs:
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPLOAD_URL: ${{ needs.build-and-release.outputs.upload_url }}
with:
upload_url: ${{ needs.build-and-release.outputs.upload_url }}
upload_url: ${{ env.UPLOAD_URL }}
asset_path: ./dist/aicommit_${GITHUB_REF#refs/tags/v}_amd64.deb
asset_name: aicommit_${{ github.ref_name }}_amd64.deb
asset_content_type: application/vnd.debian.binary-package

build-rpm-package:
needs: build-linux-x86
needs: [build-and-release, build-linux-x86]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -448,14 +449,15 @@ jobs:
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPLOAD_URL: ${{ needs.build-and-release.outputs.upload_url }}
with:
upload_url: ${{ needs.build-and-release.outputs.upload_url }}
upload_url: ${{ env.UPLOAD_URL }}
asset_path: ./dist/aicommit-${{ github.ref_name }}-1.x86_64.rpm
asset_name: aicommit-${{ github.ref_name }}-1.x86_64.rpm
asset_content_type: application/x-rpm

build-alpine-package:
needs: build-linux-x86
needs: [build-and-release, build-linux-x86]
runs-on: ubuntu-latest
container: alpine:latest
steps:
Expand Down Expand Up @@ -511,14 +513,15 @@ jobs:
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPLOAD_URL: ${{ needs.build-and-release.outputs.upload_url }}
with:
upload_url: ${{ needs.build-and-release.outputs.upload_url }}
upload_url: ${{ env.UPLOAD_URL }}
asset_path: ./dist/aicommit-${{ github.ref_name }}-r0.apk
asset_name: aicommit-${{ github.ref_name }}-r0.apk
asset_content_type: application/x-alpine-linux-package

build-arch-package:
needs: build-linux-x86
needs: [build-and-release, build-linux-x86]
runs-on: ubuntu-latest
container: archlinux:base-devel
steps:
Expand Down Expand Up @@ -567,14 +570,15 @@ jobs:
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPLOAD_URL: ${{ needs.build-and-release.outputs.upload_url }}
with:
upload_url: ${{ needs.build-and-release.outputs.upload_url }}
upload_url: ${{ env.UPLOAD_URL }}
asset_path: ./dist/aicommit-${{ github.ref_name }}-1-x86_64.pkg.tar.zst
asset_name: aicommit-${{ github.ref_name }}-1-x86_64.pkg.tar.zst
asset_content_type: application/zstd

build-snap-package:
needs: build-linux-x86
needs: [build-and-release, build-linux-x86]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -634,14 +638,15 @@ jobs:
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPLOAD_URL: ${{ needs.build-and-release.outputs.upload_url }}
with:
upload_url: ${{ needs.build-and-release.outputs.upload_url }}
upload_url: ${{ env.UPLOAD_URL }}
asset_path: ./aicommit_${{ github.ref_name }}_amd64.snap
asset_name: aicommit_${{ github.ref_name }}_amd64.snap
asset_content_type: application/vnd.snap

build-nix-package:
needs: build-linux-x86
needs: [build-and-release, build-linux-x86]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -721,8 +726,9 @@ jobs:
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPLOAD_URL: ${{ needs.build-and-release.outputs.upload_url }}
with:
upload_url: ${{ needs.build-and-release.outputs.upload_url }}
upload_url: ${{ env.UPLOAD_URL }}
asset_path: ./dist-nix/aicommit-${{ github.ref_name }}.tar.gz
asset_name: aicommit-${{ github.ref_name }}.tar.gz
asset_content_type: application/gzip
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aicommit"
version = "0.1.109"
version = "0.1.110"
edition = "2021"
authors = ["Eugen Soloviov <[email protected]>"]
description = "A CLI tool that generates concise and descriptive git commit messages using LLMs"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@
"postinstall": "chmod +x index.js",
"start": "node index.js"
},
"version": "0.1.109"
"version": "0.1.110"
}
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.109
0.1.110

0 comments on commit 1e2f820

Please sign in to comment.