-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 1.05 KB
/
build.yml
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
name: Build
on:
workflow_dispatch:
schedule:
- cron: '5 4 * * *'
jobs:
build:
name: Update plugin
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
updated: ${{ steps.update.outputs.updated }}
version: ${{ steps.update.outputs.version }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Retrieve the latest version number
run: |
git clone --depth 1 https://github.com/richiefi/richie-editions-wordpress.git package
{
echo 'LATEST_VERSION<<EOF'
cat package/richie-editions-wp.php | grep 'Version:' | sed 's/.*: *//'
echo 'EOF'
} >> "$GITHUB_ENV"
rm -rf package
- name: Update repo
uses: generoi/github-action-update-plugins@master
id: update
with:
download_url: https://github.com/richiefi/richie-editions-wordpress/archive/refs/tags/v${{ env.LATEST_VERSION }}.zip
version: ${{ env.LATEST_VERSION }}
strip_archive_folder: 'true'