Skip to content

Commit 4d15b1d

Browse files
committed
chore(workflows): updated release.yml
1 parent 55e2a84 commit 4d15b1d

1 file changed

Lines changed: 5 additions & 68 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -12,71 +12,8 @@ permissions:
1212

1313
jobs:
1414
release:
15-
name: Package and Release
16-
runs-on: ubuntu-latest
17-
18-
steps:
19-
# 1. Checkout code
20-
- name: 1️⃣ Checkout code
21-
uses: actions/checkout@v4
22-
with:
23-
fetch-depth: 0
24-
25-
# 2. Set up variables
26-
- name: 2️⃣ Set up variables
27-
id: vars
28-
run: |
29-
TAG_NAME=${GITHUB_REF#refs/tags/}
30-
NAME="${{ vars.CSK_NAME }}"
31-
ZIP_NAME="${NAME}-${TAG_NAME}.zip"
32-
echo "tag=$TAG_NAME" >> $GITHUB_OUTPUT
33-
echo "name=$NAME" >> $GITHUB_OUTPUT
34-
echo "zip=$ZIP_NAME" >> $GITHUB_OUTPUT
35-
36-
# 3. Prepare ZIP contents
37-
- name: 3️⃣ Prepare ZIP contents
38-
run: |
39-
mkdir "${{ steps.vars.outputs.name }}"
40-
rsync -av --exclude='.git' \
41-
--exclude='.github' \
42-
--exclude='.gitdocs' \
43-
--exclude='.dev' \
44-
--exclude='.gitignore' \
45-
--exclude='.gitattributes' \
46-
--exclude='.editorconfig' \
47-
--exclude='.gitmodules' \
48-
--exclude='CITATION.cff' \
49-
--exclude='project.yml' \
50-
--exclude='*.todolist' \
51-
--exclude="${{ steps.vars.outputs.name }}" \
52-
./ "${{ steps.vars.outputs.name }}"
53-
54-
# 4. Create ZIP archive
55-
- name: 4️⃣ Create ZIP archive
56-
run: |
57-
zip -r "${{ steps.vars.outputs.zip }}" "${{ steps.vars.outputs.name }}"
58-
59-
# 5. Create GitHub Release and Upload ZIP
60-
- name: 5️⃣ Create GitHub Release and Upload ZIP
61-
uses: softprops/action-gh-release@v2
62-
with:
63-
tag_name: ${{ steps.vars.outputs.tag }}
64-
files: ${{ steps.vars.outputs.zip }}
65-
66-
dispatch:
67-
name: Notify Projects
68-
runs-on: ubuntu-latest
69-
needs: release
70-
71-
steps:
72-
- name: Trigger update
73-
uses: peter-evans/repository-dispatch@v3
74-
with:
75-
token: ${{ secrets.CSK_PAT }}
76-
repository: ianhubnet/csk-projects
77-
event-type: update-submodules
78-
client-payload: |
79-
{
80-
"name": "${{ vars.CSK_NAME }}",
81-
"repo": "${{ github.repository }}"
82-
}
15+
uses: ianhubnet/csk-release/.github/workflows/project.yml@main
16+
with:
17+
name: ${{ vars.CSK_NAME }}
18+
secrets:
19+
token: ${{ secrets.CSK_PAT }}

0 commit comments

Comments
 (0)