Skip to content

Define IDE versions in the gradle.properties (#3633) #110

Define IDE versions in the gradle.properties (#3633)

Define IDE versions in the gradle.properties (#3633) #110

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup JBR 21
uses: gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d
with:
distribution: 'jetbrains'
java-version: 21
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
otp-version: 24.3.4.6
elixir-version: 1.13.0
- name: Export OTP_RELEASE
run: echo "OTP_RELEASE=24.3.4.6" >> $GITHUB_ENV
- name: Export ERLANG_SDK_HOME
run: echo "ERLANG_SDK_HOME=`erl -eval 'io:format("~s", [code:root_dir()]).' -noshell -run init stop`" >> $GITHUB_ENV
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Compile Tests with Gradle
run: ./gradlew --stacktrace compileTestJava
- name: Get Elixir Source
run: ./gradlew --stacktrace getElixir
- name: Release Quoter
run: ./gradlew --stacktrace releaseQuoter
- name: Test with Gradle
run: ./gradlew --stacktrace test
verifyPlugin:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup JBR 21
uses: gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d
with:
distribution: 'jetbrains'
java-version: 21
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run Plugin Verifier
run: ./gradlew --stacktrace verifyPlugin
release:
needs: [ test, verifyPlugin ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup JBR 21
uses: gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d
with:
distribution: 'jetbrains'
java-version: 21
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew buildPlugin
- name: Export ASSET_PATH
run: echo "ASSET_PATH=`ls -1 build/distributions/intellij-elixir-*.zip`" >> $GITHUB_ENV
- name: Export ASSET_NAME
run: echo "ASSET_NAME=${ASSET_PATH#build/distributions/}" >> $GITHUB_ENV
- name: Export TAG
run: |
version_suffix_zip=${ASSET_NAME#intellij-elixir-}
echo "TAG=v${version_suffix_zip%.zip}" >> $GITHUB_ENV
- name: Tag Commit
uses: hole19/git-tag-action@master
env:
# TAG set above with `set-env name=TAG`
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAG }}
release_name: ${{ env.TAG }}
prerelease: true
- 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: ${{ env.ASSET_PATH }}
asset_name: ${{ env.ASSET_NAME }}
asset_content_type: application/zip
- name: Publish
env:
JET_BRAINS_MARKETPLACE_TOKEN: ${{ secrets.JetBrainsMarketplaceToken }}
run: ./gradlew --stacktrace publishPlugin