Skip to content

Commit 69303f8

Browse files
author
Duncan McClean
committed
Merge branch 'main' of github.com:steadfast-collective/convertkit
2 parents f514437 + 77529cc commit 69303f8

11 files changed

+166
-54
lines changed

.github/workflows/release.yaml

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# This workflow tags a release, builds front-end assets and sends various notifications & webhooks when a release has been created.
2+
3+
# How it works:
4+
# 1. Add release notes to the CHANGELOG.md file. Commit & push them up.
5+
# 2. Create a git tag and push it up - `git tag <version number> && git push origin --tags`
6+
# 3. This action will create a release, using the latest notes from the CHANGELOG.md file.
7+
# 4. It'll build the front-end assets and attach them to the release.
8+
# 5. Finally, it'll comment on the PRs & Issues mentioned in the changelog to let everyone know a release has been tagged.
9+
10+
name: Release
11+
12+
on:
13+
push:
14+
tags:
15+
- "v*"
16+
17+
jobs:
18+
release:
19+
name: Prepare & Create Release
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v1
24+
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: 8.2
29+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
30+
tools: composer:v2
31+
32+
- name: Install NPM Dependencies
33+
run: npm install
34+
35+
- name: Install Composer Dependencies
36+
run: composer install
37+
38+
- name: Compile assets
39+
run: npm run build
40+
41+
- name: Create zip
42+
run: tar -czvf dist.tar.gz dist
43+
44+
- name: Get Changelog
45+
id: changelog
46+
uses: statamic/changelog-action@v1
47+
with:
48+
version: ${{ github.ref }}
49+
50+
- name: Create release
51+
id: create_release
52+
uses: actions/create-release@v1
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
with:
56+
tag_name: ${{ github.ref }}
57+
release_name: ${{ github.ref }}
58+
body: ${{ steps.changelog.outputs.text }}
59+
prerelease: ${{ contains(github.ref, '-beta') }}
60+
61+
- name: Upload zip to release
62+
uses: actions/[email protected]
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
with:
66+
upload_url: ${{ steps.create_release.outputs.upload_url }}
67+
asset_path: ./dist.tar.gz
68+
asset_name: dist.tar.gz
69+
asset_content_type: application/tar+gz
70+
71+
- name: Comment on related issues
72+
uses: duncanmcclean/[email protected]
73+
env:
74+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
with:
76+
version: ${{ github.ref }}
77+
changelog: ${{ steps.changelog.outputs.text }}

.gitignore

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1+
.DS_Store
2+
.phpunit.result.cache
3+
.php_cs.cache
4+
.php-cs-fixer.cache
5+
.idea
16
node_modules
27
vendor
3-
mix-manifest.json
4-
resources/dist/hot
8+
dist
9+
!dist/.gitkeep
10+
vite.hot
11+
.env

composer.json

+12
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@
1414
"providers": [
1515
"SteadfastCollective\\ConvertKit\\ServiceProvider"
1616
]
17+
},
18+
"download-dist": {
19+
"url": "https://github.com/steadfast-collective/convertkit/releases/download/{$version}/dist.tar.gz",
20+
"path": "dist"
21+
}
22+
},
23+
"require": {
24+
"pixelfear/composer-dist-plugin": "^0.1.6"
25+
},
26+
"config": {
27+
"allow-plugins": {
28+
"pixelfear/composer-dist-plugin": true
1729
}
1830
}
1931
}

composer.lock

+51-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/css/addon.css

-3
This file was deleted.

resources/dist/build/assets/addon-d503415a.css

-1
This file was deleted.

0 commit comments

Comments
 (0)