Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
Publish agent
Browse files Browse the repository at this point in the history
  • Loading branch information
SerVB committed Oct 20, 2020
1 parent ad72df9 commit f5afec3
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/release-agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Upload Release Asset (agent)

on:
push:
tags:
- "agent-v*"

jobs:
main:
name: Upload Release Asset (agent)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Java 11
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Build project
run: |
./gradlew :projector-plugin:buildPlugin
cd projector-plugin/build/distributions
find . -maxdepth 1 -type f -name projector-plugin-*.zip -exec mv {} projector-plugin.zip \;
- 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: false
prerelease: false
- name: Tag name # Inspired from https://github.community/t/how-to-get-just-the-tag-name/16241/11
id: tag_name
run: echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: Upload Release Asset (agent)
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: projector-plugin/build/distributions/projector-plugin.zip
asset_name: projector-plugin-${{ steps.tag_name.outputs.SOURCE_TAG }}.zip
asset_content_type: application/zip
9 changes: 9 additions & 0 deletions projector-agent/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
plugins {
id("org.jetbrains.kotlin.jvm")
id("maven-publish")
}

publishing {
publications {
maven(MavenPublication) {
from components.java
}
}
}

def agentClassName = "org.jetbrains.projector.agent.MainAgent"
Expand Down

0 comments on commit f5afec3

Please sign in to comment.