-
Notifications
You must be signed in to change notification settings - Fork 89
42 lines (35 loc) · 1.4 KB
/
per-starter-release.yml
File metadata and controls
42 lines (35 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# .github/workflows/release-template.yml
name: Release All Starters
on:
workflow_dispatch: # Allows manual trigger
push:
tags:
- 'v*.*.*' # Triggers on tags like v1.0.0
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get version from tag
id: get_version
run: |
TAG="${GITHUB_REF##*/}"
VERSION="${TAG#v}"
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Zip all starter directories
run: |
mkdir -p dist
for dir in angular astro-shadcn bolt-expo bolt-qwik bolt-remotion bolt-vite-react-ts bootstrap-5 egg express-simple graphql gsap-next gsap-nuxt gsap-react gsap-svelte gsap-sveltekit gsap-vue hono-nodejs-starter js nextjs nextjs-shadcn node nodemon quasar react-ts react rxjs slidev static sveltekit tres tutorialkit typescript vite-shadcn vue web-platform; do
if [ -d "$dir" ]; then
zip -r "dist/$dir-${{ steps.get_version.outputs.version }}.zip" "$dir" -x "$dir/node_modules/*"
fi
done
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: "Starters v${{ steps.get_version.outputs.version }}"
files: dist/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}