-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.23 KB
/
Copy pathrelease.yml
File metadata and controls
42 lines (34 loc) · 1.23 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
name: Build and attach release zip
on:
push:
tags:
- 'v*'
jobs:
build-release-zip:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create release zip
run: |
set -e
VERSION="${GITHUB_REF_NAME}"
ZIP="one-shot-migrate-${VERSION}.zip"
# Create dist directory first
mkdir -p dist
# Create temp folder structure for proper zip naming
mkdir -p temp/one-shot-migrate
# Copy files (excluding git/github/temp/dist)
rsync -av --exclude='.git' --exclude='.github' --exclude='temp' --exclude='dist' . temp/one-shot-migrate/
# Create zip from temp directory
cd temp
zip -r "../dist/${ZIP}" one-shot-migrate
- name: Create GitHub Release and upload asset
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
VERSION="${GITHUB_REF_NAME}"
ZIP="one-shot-migrate-${VERSION}.zip"
gh release create "${VERSION}" "dist/${ZIP}" --title "${VERSION}" --notes-file "RELEASE_NOTES.md" || \
gh release upload "${VERSION}" "dist/${ZIP}" --clobber