Skip to content

Commit

Permalink
Add nightly release workflow and reuse steps via composite action
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler authored and egorikftp committed Jul 22, 2024
1 parent 5c919e6 commit cc07a02
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 27 deletions.
39 changes: 39 additions & 0 deletions .github/actions/sign-and-verify-intellij-plugin/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: 'Sign and Verify IntelliJ Plugin'
description: 'A composite actions for signing and verifying IntelliJ plugins.'

inputs:
GITHUB_TOKEN:
description: 'GitHub token'
required: true

runs:
using: 'composite'
steps:
- name: Build signed plugin
shell: bash
run: ./gradlew signPlugin
- name: Verify IntelliJ plugin
# https://www.jetbrains.com/idea/download/other.html
uses: ChrisCarini/[email protected]
env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
with:
plugin-location: idea-plugin/build/distributions/*-signed.zip
ide-versions: |
ideaIC:2024.1
ideaIC:2024.1.1
ideaIC:2024.1.2
ideaIC:2024.1.3
ideaIC:2024.1.4
ideaIC:LATEST-EAP-SNAPSHOT
failure-levels: |
COMPATIBILITY_WARNINGS
COMPATIBILITY_PROBLEMS
DEPRECATED_API_USAGES
INTERNAL_API_USAGES
OVERRIDE_ONLY_API_USAGES
NON_EXTENDABLE_API_USAGES
PLUGIN_STRUCTURE_WARNINGS
MISSING_DEPENDENCIES
INVALID_PLUGIN
NOT_DYNAMIC
30 changes: 3 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,34 +50,10 @@ jobs:
echo "version=$VERSION" >> $GITHUB_ENV
echo "artifactName=$NAME-$VERSION" >> $GITHUB_ENV
- name: Build signed plugin
run: ./gradlew signPlugin

- name: Verify IntelliJ plugin
# https://www.jetbrains.com/idea/download/other.html
uses: ChrisCarini/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Sign and Verify IntelliJ Plugin
uses: ./.github/actions/sign-and-verify-intellij-plugin
with:
plugin-location: idea-plugin/build/distributions/*-signed.zip
ide-versions: |
ideaIC:2024.1
ideaIC:2024.1.1
ideaIC:2024.1.2
ideaIC:2024.1.3
ideaIC:2024.1.4
ideaIC:LATEST-EAP-SNAPSHOT
failure-levels: |
COMPATIBILITY_WARNINGS
COMPATIBILITY_PROBLEMS
DEPRECATED_API_USAGES
INTERNAL_API_USAGES
OVERRIDE_ONLY_API_USAGES
NON_EXTENDABLE_API_USAGES
PLUGIN_STRUCTURE_WARNINGS
MISSING_DEPENDENCIES
INVALID_PLUGIN
NOT_DYNAMIC
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to Marketplace
run: ./gradlew publishPlugin
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,34 @@ jobs:

- name: Run build
run: ./gradlew build

nightly-release:
runs-on: ubuntu-latest
needs: build
if: github.repository == 'ComposeGears/Valkyrie' && github.ref == 'refs/heads/main'
permissions:
contents: write
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: Sign and Verify IntelliJ Plugin
uses: ./.github/actions/sign-and-verify-intellij-plugin
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
env:
CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }}
- name: Delete release if exist then create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release view "Nightly" && gh release delete "Nightly" -y --cleanup-tag
gh release create "Nightly" idea-plugin/build/distributions/*-signed.zip -p --generate-notes

0 comments on commit cc07a02

Please sign in to comment.