Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit de962f7

Browse files
committed
test: add all repo for releases
1 parent 75685a2 commit de962f7

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

.github/workflows/main.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
name: Create Release with Main Directory
1+
name: Create Release
22

33
on:
44
push:
55
branches: [ main ]
6+
# Uncomment below if you want to trigger on tags instead
67
# tags:
78
# - "v*" # Trigger on tags starting with 'v' (e.g., v1.0.0)
89

@@ -15,27 +16,39 @@ jobs:
1516
steps:
1617
- name: Checkout Repository
1718
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0 # This fetches all history for proper versioning
21+
22+
- name: Generate Tag
23+
id: tag
24+
# Create a tag based on the date and run number if we're not triggered by a tag
25+
run: |
26+
if [[ "${{ github.ref_type }}" == "tag" ]]; then
27+
echo "tag=${{ github.ref_name }}" >> $GITHUB_OUTPUT
28+
else
29+
echo "tag=v$(date +'%Y.%m.%d')-build.${{ github.run_number }}" >> $GITHUB_OUTPUT
30+
fi
1831
19-
- name: Zip Main Directory
20-
run: zip -r release.zip ./main/ # Replace `main` with your directory name
32+
- name: Zip Entire Repository
33+
run: zip -r fedora-setup.zip ./ -x "*.git*" ".github/*"
2134

2235
- name: Create Release
2336
id: create-release
2437
uses: actions/create-release@v1
2538
env:
2639
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2740
with:
28-
tag_name: ${{ github.ref_name }}
29-
release_name: "Release ${{ github.ref_name }}"
41+
tag_name: ${{ steps.tag.outputs.tag }}
42+
release_name: "Release ${{ steps.tag.outputs.tag }}"
3043
draft: false
3144
prerelease: false
3245

3346
- name: Upload Release Asset
34-
uses: actions/upload-release-asset@v2
47+
uses: actions/upload-release-asset@v1
3548
env:
3649
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3750
with:
3851
upload_url: ${{ steps.create-release.outputs.upload_url }}
39-
asset_path: ./release.zip
40-
asset_name: source-code.zip
52+
asset_path: ./fedora-setup.zip
53+
asset_name: fedora-setup.zip
4154
asset_content_type: application/zip

0 commit comments

Comments
 (0)