Skip to content

Commit f75d409

Browse files
author
Vitaliy
authored
Merge pull request #218 from magento/alpha-deploy
Added a publish alpha version workflow of the plugin to the JetBrains repo
2 parents 03d84d2 + 17e79f9 commit f75d409

File tree

4 files changed

+42
-2
lines changed

4 files changed

+42
-2
lines changed

.github/workflows/gradlepublish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ jobs:
2525
run: ./gradlew publishPlugin -i
2626
env:
2727
MAGENTO_PHPSTORM_intellijPublishToken: ${{ secrets.JET_BRAINS_TOKEN }}
28+
MAGENTO_PHPSTORM_isAlpha: false
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This workflow will build a package using Gradle and then publish it to JetBrains alpha repository when a PR is merged to the develop branch
2+
3+
name: Publish Plugin alpha version
4+
5+
on:
6+
push:
7+
branches:
8+
- 1.0.1-develop
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up JDK 1.8
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: 1.8
21+
- name: Gradle wrapper
22+
run: gradle wrapper
23+
- name: Grant execute permission for gradlew
24+
run: chmod +x gradlew
25+
- name: Run publish plugin
26+
run: ./gradlew publishPlugin -i
27+
env:
28+
MAGENTO_PHPSTORM_intellijPublishToken: ${{ secrets.JET_BRAINS_TOKEN }}
29+
MAGENTO_PHPSTORM_isAlpha: true

build.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plugins {
88
}
99

1010
group 'com.magento.idea'
11-
version '1.0.1'
11+
version '0.0.9'
1212

1313
apply plugin: 'org.jetbrains.intellij'
1414
apply plugin: 'java'
@@ -45,4 +45,14 @@ sourceSets {
4545

4646
publishPlugin {
4747
token = System.getenv("MAGENTO_PHPSTORM_intellijPublishToken")
48+
if (Boolean.valueOf(System.getenv("MAGENTO_PHPSTORM_isAlpha"))) {
49+
channels 'alpha'
50+
//version = version + "-alpha-" + getDate()
51+
}
52+
}
53+
54+
static def getDate() {
55+
def date = new Date()
56+
def formattedDate = date.format('yyyy-MM-dd-HH-mm')
57+
return formattedDate
4858
}

resources/META-INF/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<idea-plugin>
88
<id>com.magento.idea.magento2plugin</id>
99
<name>Magento PhpStorm</name>
10-
<version>1.0.1</version>
10+
<version>0.0.9</version>
1111
<vendor url="https://github.com/magento/magento2-phpstorm-plugin">Magento Inc.</vendor>
1212

1313
<description><![CDATA[

0 commit comments

Comments
 (0)