Build And Release Tabby #7
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: build-release | |
run-name: Build And Release Tabby | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build_release: | |
runs-on: ubuntu-latest | |
name: build_release | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Build | |
run: | | |
./gradlew bootJar | |
echo "artifactPath=$(pwd)" >> $GITHUB_ENV | |
version=$(cat VERSION) | |
tag=${GITHUB_REF_NAME} | |
echo "version=$version" >> $GITHUB_ENV | |
echo "tag=$tag" >> $GITHUB_ENV | |
cp build/libs/tabby.jar . | |
zip -r tabby.zip . -x "build/*" ".github/*" "cyphers/*" ".git/*" "doc/*" "gradle/*" "src/*" ".gitignore" "README.md" "*gradle*" | |
rm tabby.jar | |
# debug | |
- run: echo version is ${{ env.version }} | |
- run: echo tag is ${{ env.tag }} | |
- name: release | |
uses: actions/create-release@v1 | |
id: create_release | |
with: | |
draft: false | |
prerelease: false | |
release_name: ${{ env.tag }} | |
tag_name: ${{ env.tag }} | |
body: RELEASE:${{ env.version }}. Generated By Github Actions. | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: upload release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ env.artifactPath }}/tabby.zip | |
asset_name: tabby.zip | |
asset_content_type: application/zip |