-
Notifications
You must be signed in to change notification settings - Fork 22
75 lines (64 loc) · 2.88 KB
/
release.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
name: Deploy to WordPress.org
on:
release:
types: [ released ]
workflow_dispatch:
jobs:
release:
name: New release
runs-on: ubuntu-20.04
environment: live
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none
# - name: Install composer dependencies
# uses: php-actions/composer@v5
# with:
# php_version: 7.4
# dev: no
- uses: actions/setup-node@v2
with:
node-version: '12'
- name: Install npm dependencies & build for translation
run: |
npm install -g npm@7
npm ci
npm run build
# In order to run this WordPress also needs to be installed
- name: Generate pot file
run: |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
mv wp-cli.phar /usr/local/bin/wp
php -d xdebug.mode=off "$(which wp)" i18n make-pot ${{github.workspace}} ${{github.workspace}}/languages/wp-rollback.pot --exclude="$(cat .distignore | tr "\n" "," | sed 's/,$/ /' | tr " " "\n"),src/**/*.js,*.js.map"
- name: Build assets for production
run: npm run build
# - name: WordPress Plugin Deploy
# id: deploy
# uses: 10up/action-wordpress-plugin-deploy@stable
# with:
# generate-zip: true
# env:
# SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
# SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
# SLUG: wp-rollback
- name: Upload plugin artifact
uses: actions/upload-artifact@v3
with:
name: wp-rollback
path: wp-rollback
# - name: Upload release asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ github.event.release.upload_url }}
# asset_path: ${{github.workspace}}/wp-rollback.zip
# asset_name: wp-rollback.zip
# asset_content_type: application/zip