-
Notifications
You must be signed in to change notification settings - Fork 14
60 lines (50 loc) · 1.52 KB
/
release.yml
File metadata and controls
60 lines (50 loc) · 1.52 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
name: Create Release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.5'
- name: Install Composer dependencies
uses: nick-invision/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
command: composer install --no-interaction --prefer-dist
- name: Install dependencies
run: npm ci
- name: Compile assets
run: npm run build
- name: Create zip
run: cd resources && tar -czvf dist.tar.gz dist
- 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 zip to release
uses: actions/upload-release-asset@v1.0.1
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