Skip to content

Commit 9b9c7f5

Browse files
committed
Fix release assets
1 parent 85ab5b7 commit 9b9c7f5

File tree

2 files changed

+64
-2
lines changed

2 files changed

+64
-2
lines changed

.github/workflows/release.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Bundle Release Assets
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types:
7+
- released
8+
- prereleased
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup PHP
18+
uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: 8.4
21+
tools: composer:v2
22+
23+
- name: Use Node.js 23.3.0
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 23.3.0
27+
28+
- name: Install composer dependencies
29+
run: composer install --no-interaction --prefer-dist --optimize-autoloader
30+
31+
- name: Install node dependencies
32+
run: npm ci
33+
34+
- name: Build release assets
35+
run: npm run build
36+
37+
- name: Create zip
38+
run: tar -czvf dist.tar.gz dist
39+
40+
- name: Get release
41+
id: get_release
42+
uses: cardinalby/git-get-release-action@v1
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
with:
46+
latest: true
47+
48+
- name: Upload dist zip to release
49+
uses: actions/[email protected]
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
with:
53+
upload_url: ${{ steps.get_release.outputs.upload_url }}
54+
asset_path: ./dist.tar.gz
55+
asset_name: dist.tar.gz
56+
asset_content_type: application/tar+gz

composer.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
}
1212
},
1313
"require": {
14-
"php": "^8.2",
15-
"pixelfear/composer-dist-plugin": "^0.1.5",
14+
"php": "^8.3",
15+
"pixelfear/composer-dist-plugin": "^0.1.6",
1616
"statamic/cms": "^6.0"
1717
},
1818
"require-dev": {
@@ -24,6 +24,12 @@
2424
"phpunit/phpunit": "^12.0"
2525
},
2626
"extra": {
27+
"download-dist": [
28+
{
29+
"url": "https://github.com/thoughtco/statamic-cache-tracker/releases/download/{$version}/dist.tar.gz",
30+
"path": "dist"
31+
}
32+
],
2733
"statamic": {
2834
"name": "Statamic Cache Tracker",
2935
"description": "Keep a record of what items are used on each page and invalidate those pages when they are saved."

0 commit comments

Comments
 (0)