-
Notifications
You must be signed in to change notification settings - Fork 116
82 lines (75 loc) · 2.6 KB
/
deploy-org.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Deploy to WordPress.org
on:
push:
tags:
- "*"
permissions:
contents: write
jobs:
tag:
name: Deploy plugin for new Tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 12.1.0
uses: actions/setup-node@v4
with:
node-version: 12.1.0
- uses: actions/checkout@master
- name: Npm install and build
run: |
rm -r package-lock.json
npm i
npm run build
npm run makepot
- name: Use desired version of php
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Composer install and build # Remove or modify this step as needed
run: |
composer install --no-dev
composer dump-autoload -o
- name: WordPress Plugin Deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
with:
dry-run: true
generate-zip: true
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: wedevs-project-manager
# Generate release zip after all steps
- name: Generate zip
uses: 10up/action-wordpress-plugin-build-zip@stable
with:
slug: wedevs-project-manager # Ensure this matches your plugin's SVN slug
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: true
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
# Note, this is an exception to action secrets: GH_TOKEN is always available and provides access to
# the current repository this action runs in.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Get the URL for uploading assets to the current release.
upload_url: ${{ steps.create_release.outputs.upload_url }}
# Provide the path to the file generated in the previous step using the output.
asset_path: ${{ steps.deploy.outputs.zip-path }}
# Provide what the file should be named when attached to the release (plugin-name.zip)
asset_name: wedevs-project-manager.zip
# Provide the file type.
asset_content_type: application/zip