-
-
Notifications
You must be signed in to change notification settings - Fork 541
72 lines (59 loc) · 1.97 KB
/
release.yml
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
name: Create Release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js 16.13.0
uses: actions/setup-node@v4
with:
node-version: 16.13.0
- name: Install required npm version
run: npm -g install [email protected]
- name: Install dependencies
run: npm ci
- name: Compile assets
run: npm run build
- name: Compile frontend assets
run: npm run frontend-build
- name: Create dist zip
run: cd resources && tar -czvf dist.tar.gz dist
- name: Create dist-frontend zip
run: cd resources && tar -czvf dist-frontend.tar.gz dist-frontend
- name: Get Changelog
id: changelog
uses: statamic/changelog-action@v1
with:
version: ${{ github.ref }}
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.changelog.outputs.version }}
release_name: ${{ steps.changelog.outputs.version }}
body: ${{ steps.changelog.outputs.text }}
- name: Upload dist zip to release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./resources/dist.tar.gz
asset_name: dist.tar.gz
asset_content_type: application/tar+gz
- name: Upload dist-frontend zip to release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./resources/dist-frontend.tar.gz
asset_name: dist-frontend.tar.gz
asset_content_type: application/tar+gz