mirror of
https://github.com/anas-elgarhy/Ayah-intellij.git
synced 2024-08-15 00:43:43 +00:00
ea9f4cb033
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.6 to 3.3.1. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3.2.6...v3.3.1) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
85 lines
2.5 KiB
YAML
85 lines
2.5 KiB
YAML
# GitHub Actions Workflow created for handling the release process based on the draft release prepared
|
|
# with the Build workflow. Running the publishPlugin task requires the PUBLISH_TOKEN secret provided.
|
|
|
|
name: Release
|
|
on:
|
|
release:
|
|
types: [released]
|
|
|
|
jobs:
|
|
|
|
# Prepare and publish the plugin to the Marketplace repository
|
|
# release:
|
|
# name: Publish Plugin
|
|
# runs-on: ubuntu-latest
|
|
# steps:
|
|
#
|
|
# - name: Setup Java
|
|
# uses: actions/setup-java@v3
|
|
# with:
|
|
# java-version: 11
|
|
# distribution: 'zulu'
|
|
#
|
|
# - name: Fetch Sources
|
|
# uses: actions/checkout@v3
|
|
# with:
|
|
# ref: ${{ github.event.release.tag_name }}
|
|
#
|
|
# - name: Publish Plugin
|
|
# env:
|
|
# PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
|
|
# run: ./gradlew publishPlugin
|
|
|
|
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Setup Java
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
java-version: 11
|
|
distribution: 'zulu'
|
|
|
|
- name: Fetch Sources
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Gradle Dependencies Cache
|
|
uses: actions/cache@v3.3.1
|
|
with:
|
|
path: ~/.gradle/caches
|
|
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }}
|
|
|
|
- name: Setup Gradle Wrapper Cache
|
|
uses: actions/cache@v3.3.1
|
|
with:
|
|
path: ~/.gradle/wrapper
|
|
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
|
|
|
- name: Set environment variables
|
|
id: properties
|
|
shell: bash
|
|
run: |
|
|
PROPERTIES="$(./gradlew properties --console=plain -q)"
|
|
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
|
|
NAME="$(echo "$PROPERTIES" | grep "^pluginName_:" | cut -f2- -d ' ')"
|
|
ARTIFACT="${NAME}-${VERSION}.zip"
|
|
|
|
echo "::set-output name=version::$VERSION"
|
|
echo "::set-output name=name::$NAME"
|
|
echo "::set-output name=artifact::$ARTIFACT"
|
|
|
|
- name: Build Plugin
|
|
run: ./gradlew buildPlugin
|
|
|
|
- name: Upload Release Asset
|
|
id: upload-release-asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_path: ./build/distributions/${{ steps.properties.outputs.artifact }}
|
|
asset_name: ${{ steps.properties.outputs.artifact }}
|
|
asset_content_type: application/zip
|