Skip to content

Update plugin.properties #3

Update plugin.properties

Update plugin.properties #3

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
repository-projects: write
env:
CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }}
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
outputs:
version: ${{ steps.properties.outputs.artifactName }}
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
- name: Setup properties
id: properties
shell: bash
run: |
NAME=$(grep "^pluginName=" plugin.properties | cut -d '=' -f 2)
VERSION=$(grep "^version=" plugin.properties | cut -d '=' -f 2)
echo "NAME=$NAME"
echo "VERSION=$VERSION"
echo "name=$NAME" >> $GITHUB_ENV
echo "version=$VERSION" >> $GITHUB_ENV
echo "artifactName=$NAME-$VERSION" >> $GITHUB_ENV
- name: Sign and Verify IntelliJ Plugin
uses: ./.github/actions/sign-and-verify-intellij-plugin
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to Marketplace
run: ./gradlew publishPlugin
- name: Remove old 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/{}
- name: Create draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ env.artifactName }} \
--draft \
--title "${{ env.artifactName }}" \
--notes ""
- name: Upload release asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ env.artifactName }} ./idea-plugin/build/distributions/*-signed.zip