Skip to content

fix: use login_init hook #18

fix: use login_init hook

fix: use login_init hook #18

Workflow file for this run

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@v4
- 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