-
-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (43 loc) · 1.22 KB
/
package.yml
File metadata and controls
51 lines (43 loc) · 1.22 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
name: Package
on:
push:
branches:
- master
tags:
- v*
pull_request:
jobs:
package:
runs-on: ubuntu-latest
env:
SUFFIX: ${{ github.ref_type == 'tag' && github.ref_name || github.head_ref || github.sha }}
steps:
- uses: actions/checkout@v6
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
- name: Install dependencies
run: composer install --no-dev --optimize-autoloader
- name: Create artifact
run: |
mkdir ~/logto
cp -r . ~/logto
cd ~
zip -X -r logto-plugin.zip logto/ -x "*/node_modules/*" ".*" "*/.*" "composer.*" README.md renovate.json
cd -
mv ~/logto-plugin.zip ./logto-plugin-${{ env.SUFFIX }}.zip
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: logto-plugin-${{ env.SUFFIX }}
path: logto-plugin-${{ env.SUFFIX }}.zip
retention-days: 1
if-no-files-found: error
- name: Create release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
draft: true
append_body: true
files: logto-plugin-${{ env.SUFFIX }}.zip