-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Create Releases from Specific Subdirectories | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
create-github-releases: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Create Releases for Specific Subdirectories | ||
run: | | ||
# List of subdirectories for which releases need to be created | ||
subdirs=("jac" "jac-mtllm" "jac-cloud") | ||
for dir in "${subdirs[@]}"; do | ||
# Extract the directory name as the release name | ||
release_name=$(basename "$dir") | ||
# Get the latest commit hash for this subdirectory | ||
release_version=$(git log -n 1 --format=%h -- "$dir") | ||
# Create a release for the subdirectory with the release version (commit hash) | ||
gh release create "$release_name-$release_version" "$dir/*" --title "$release_name" --notes "Release for $release_name version $release_version" | ||
done | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |