Skip to content

Commit 898d4a3

Browse files
committed
added release workflow2
1 parent dd5fa42 commit 898d4a3

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,24 @@ jobs:
1313

1414
- name: Prepare Release Artifact
1515
run: |
16+
ZIP_NAME="${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.zip"
1617
# Create a directory for the filtered output
1718
mkdir release_package
1819
1920
# Use rsync to copy everything except the excluded folder
2021
# Replace 'folder_to_exclude' with the actual folder name
21-
rsync -av --exclude manual/* ./ release_package/
22+
rsync -av --exclude manual/ ./ release_package/
2223
2324
# Compress the filtered directory
2425
cd release_package
25-
zip -r ../release-artifact.zip .
26+
zip -r "../$ZIP_NAME" .
27+
28+
# Store the filename in the GITHUB_ENV so it can be accessed in other steps
29+
echo "ARTIFACT_NAME=$ZIP_NAME" >> $GITHUB_ENV
2630
2731
- name: Upload Release Asset
2832
uses: softprops/action-gh-release@v2
2933
with:
30-
files: release-artifact.zip
34+
files: ${{ env.ARTIFACT_NAME }}
3135
env:
3236
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)