Skip to content

Commit

Permalink
Add github release
Browse files Browse the repository at this point in the history
  • Loading branch information
ypkang committed Dec 5, 2024
1 parent 489166a commit 1d57d14
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release-github.yml
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 }}

0 comments on commit 1d57d14

Please sign in to comment.