Skip to content

release branch changed to test-release-new because test-release is pr… #20

release branch changed to test-release-new because test-release is pr…

release branch changed to test-release-new because test-release is pr… #20

Workflow file for this run

# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Tag and publish a release
on:
push:
tags:
- 'v*.*.*'
branches: [ test-release-new ]
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- name: Set release version Name
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up JDK 17.0
uses: actions/setup-java@v1
with:
java-version: 17.0
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew -Dtests.security.manager=false build
- name: Rename build assets
run: mv ./build/distributions/ltr-*.zip ./ltr-plugin-${{ env.RELEASE_VERSION }}.zip
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
with:
artifacts: "./ltr-plugin-${{ env.RELEASE_VERSION }}.zip"
token: ${{ secrets.GITHUB_TOKEN }}
tag: "release-${{ env.RELEASE_VERSION }}"
- name: Upload Release Asset
id: upload-release-asset
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: "release-${{ env.RELEASE_VERSION }}"
#upload_url: ${{ steps.create_release.outputs.upload_url }}
files: ./ltr-plugin-${{ env.RELEASE_VERSION }}.zip
name: ${{ env.RELEASE_VERSION }}