-
Notifications
You must be signed in to change notification settings - Fork 8
95 lines (78 loc) · 2.82 KB
/
Copy pathdev-release.yml
File metadata and controls
95 lines (78 loc) · 2.82 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Development Release 🚧
on:
workflow_run:
workflows: ["Build and Test 🏗️"]
types:
- completed
branches:
- main
jobs:
build-and-release:
name: Update Development Release 📦
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
permissions:
contents: write
steps:
- name: Checkout code 🛎️
uses: actions/checkout@v4
- name: Set up Node.js ⚙️
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
cache-dependency-path: yarn.lock
- name: Install Dependencies 📦
run: |
HUSKY=0 CYPRESS_INSTALL_BINARY=0 yarn install --prefer-offline --frozen-lockfile
- name: Build Project 🚧
run: |
yarn build
env:
CI: false
- name: Package Build 📦
run: |
cd build/ && tar -zcvf ../console.tgz --exclude='./data' .
- name: Build Project (Embed) 🚧
run: |
rm -rf build/
SKUPPER_CONSOLE_EMBED=true yarn build
env:
CI: false
- name: Package Build (Embed) 📦
run: |
cd build/ && tar -zcvf ../console-embed.tgz --exclude='./data' .
- name: Get commit info 📋
id: commit_info
run: |
echo "timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
echo "message<<EOF" >> $GITHUB_OUTPUT
git log -1 --pretty=%B >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Update development tag 🏷️
run: |
git tag -f development
git push -f origin development
- name: Update Development Release ✨
run: |
# Delete existing release if it exists
gh release delete development --yes || true
# Create new release
gh release create development console.tgz console-embed.tgz \
--title "Development Build" \
--notes "$(cat <<EOF
🚧 **Development Build** - Latest build from main branch
This is an automatically updated development release containing the latest build from the main branch.
**Warning**: This is a development build and may contain unstable features.
**Built from**: ${{ github.sha }}
**Build date**: ${{ steps.commit_info.outputs.timestamp }}
## Download
- [console.tgz](https://github.com/${{ github.repository }}/releases/download/development/console.tgz)
- [console-embed.tgz](https://github.com/${{ github.repository }}/releases/download/development/console-embed.tgz)
## Latest Commit
${{ steps.commit_info.outputs.message }}
EOF
)" \
--prerelease
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}