Merge pull request #151 from SpigotBasics/fixed-tabcomplete #20
Workflow file for this run
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: Release | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
release: | |
name: Release Basics | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout main branch | |
uses: actions/checkout@v2 | |
- name: Setup JDK 17 | |
uses: actions/[email protected] | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Get Tag name | |
uses: olegtarasov/[email protected] | |
- name: Update version in build.gradle.kts | |
run: | | |
GIT_REF=${{ steps.tagName.outputs.tag }} # not needed | |
echo "Project version adjusted to $GIT_TAG_NAME" | |
sed -i "s/version = \".*\"/version = \"$GIT_TAG_NAME\"/" build.gradle.kts | |
- name: Build zip archive with Gradle Wrapper | |
run: ./gradlew build zipDistribution --scan | |
- name: Generate checksum | |
run: | | |
cd build/dist | |
CHECKSUM=`sha256sum basics-$GIT_TAG_NAME.zip` | |
cd ../.. | |
echo $CHECKSUM > checksum.txt | |
echo -e "### SHA256 Checksum\n\`\`\`\n$CHECKSUM\n\`\`\`" > checksum_md.txt | |
- name: Create release | |
uses: softprops/[email protected] | |
with: | |
files: | | |
build/dist/basics-${{ env.GIT_TAG_NAME }}.zip | |
checksum.txt | |
draft: false | |
generate_release_notes: true | |
append_body: true | |
body_path: checksum_md.txt |