Skip to content

Commit

Permalink
fix: update for 2022.1+ (cont.)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaohui-wyh committed Aug 22, 2022
1 parent 258f4a6 commit 3e3bec7
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
39 changes: 37 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build
on:
push:
branches: [ main, master ]
branches: [ main ]
# Trigger the workflow on any pull request
pull_request:

Expand Down Expand Up @@ -94,4 +94,39 @@ jobs:
uses: actions/upload-artifact@v2.2.4
with:
name: ${{ steps.artifact.outputs.filename }}
path: ./build/distributions/content/*/*
path: ./build/distributions/content/*/*

# Prepare a draft release for GitHub Releases page for the manual verification
# If accepted and published, release workflow would be triggered
releaseDraft:
name: Release Draft
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
steps:

# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v2.4.0

# Remove old release drafts by using the curl request for the available releases with draft flag
- name: Remove Old Release Drafts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api repos/{owner}/{repo}/releases \
--jq '.[] | select(.draft == true) | .id' \
| xargs -I '{}' gh api -X DELETE repos/{owner}/{repo}/releases/{}
# Create new release draft - which is not publicly visible and requires manual acceptance
- name: Create Release Draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create v${{ needs.build.outputs.version }} \
--draft \
--title "v${{ needs.build.outputs.version }}" \
--notes "$(cat << 'EOM'
${{ needs.build.outputs.changelog }}
EOM
)"
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ javaVersion=11
gradleVersion=7.3
platformType=IC
platformVersion=2021.2
pluginSinceBuild=201
pluginSinceBuild=212
pluginUntilBuild=
kotlin.stdlib.default.dependency=false
3 changes: 1 addition & 2 deletions src/com/intellij/awesomeKt/view/AkToolWindow.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ import com.intellij.openapi.project.Project
import com.intellij.openapi.util.Disposer
import com.intellij.openapi.wm.ToolWindow
import com.intellij.openapi.wm.ToolWindowFactory
import com.intellij.ui.content.ContentFactory

/**
* Created by Roger™
*/
class AkToolWindow : ToolWindowFactory, DumbAware {

override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {
val contentFactory = ContentFactory.SERVICE.getInstance()
val contentFactory = toolWindow.contentManager.factory
val content = AkToolWindowContent(project)
val contentObj = contentFactory.createContent(content.createToolWindow(), "", false)
toolWindow.contentManager.addContent(contentObj)
Expand Down

0 comments on commit 3e3bec7

Please sign in to comment.