Create Release #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Release | |
on: workflow_dispatch | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: temurin | |
cache: gradle | |
- name: Build Artifact | |
run: | | |
./gradlew clean buildPlugin | |
env: | |
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} | |
- name: Get Version | |
run: | | |
echo "RELEASE_VERSION=$(./gradlew properties --no-daemon --console=plain -q | grep '^version:' | awk '{print $2}')" >> $GITHUB_ENV | |
- name: Create Release | |
id: create-release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: "v${{ env.RELEASE_VERSION }}" | |
release_name: "Simple Sops Edit v${{ env.RELEASE_VERSION }}" | |
body: "" | |
draft: false | |
prerelease: false | |
- name: Upload Artifact | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create-release.outputs.upload_url }} | |
asset_path: "build/distributions/intellij-sops-plugin-${{ env.RELEASE_VERSION }}.zip" | |
asset_name: "intellij-sops-plugin-${{ env.RELEASE_VERSION }}.zip" | |
asset_content_type: application/octet-stream |