Skip to content

Commit

Permalink
Update intellij-plugin-branch.yml
Browse files Browse the repository at this point in the history
Create releases for intellij plugin
  • Loading branch information
shannah authored Dec 29, 2023
1 parent 178644e commit f3a890b
Showing 1 changed file with 43 additions and 4 deletions.
47 changes: 43 additions & 4 deletions .github/workflows/intellij-plugin-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

name: IntelliJ Plugin Branch Release
on:
#push:
# tags: '*'
# branches: [master]
push:
tags: '*'
branches: '*'
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -45,7 +45,46 @@ jobs:
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: plugin
name: jdeploy-intellij-plugin.zip
path: |
jdeploy-intellij-plugin/build/distributions/*.zip
jdeploy-intellij-plugin/build/idea-sandbox/plugins
release:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && !startsWith(github.ref, 'refs/pull/')
steps:
- uses: actions/checkout@v2

- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: jdeploy-intellij-plugin.zip

- name: Get the version
id: get_version
run: |
echo "##[set-output name=version;]$(echo ${GITHUB_REF#refs/*/})"
shell: bash

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.version }}
release_name: jdeploy-intellij-plugin-${{ steps.get_version.outputs.version }}
draft: false
prerelease: false

- name: 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: ./plugin/jdeploy-intellij-plugin.zip
asset_name: jdeploy-intellij-plugin-${{ steps.get_version.outputs.version }}.zip
asset_content_type: application/zip

0 comments on commit f3a890b

Please sign in to comment.