mirror of
https://github.com/InsanusMokrassar/KotlinPublicationScriptsBuilder.git
synced 2024-11-22 08:13:56 +00:00
50 lines
2.0 KiB
YAML
50 lines
2.0 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
name: Commit release
|
|
|
|
jobs:
|
|
build-ubuntu:
|
|
name: Commit release
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
- name: Setup JDK
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 11
|
|
- name: Set version from gradle.properties
|
|
run: echo "version=` cat gradle.properties | grep ^version= | grep -o [\\.0-9]* `" >> $GITHUB_ENV
|
|
- name: Build
|
|
run: ./gradlew build packageUberJarForCurrentOS
|
|
- name: Publish Web
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./web/build/distributions
|
|
publish_branch: site
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
|
|
with:
|
|
tag_name: build-${{ github.sha }}
|
|
release_name: "Build #${{ github.run_number }}"
|
|
body: It is just temporal release for ${{ github.sha }} commit
|
|
draft: false
|
|
prerelease: true
|
|
- name: Upload Ubuntu Release Asset
|
|
id: upload-ubuntu-release-asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
|
asset_path: "./desktop/build/compose/jars/kmppscriptbuilder.desktop-linux-x64-${{ env.version }}${{ env.additional_version }}.jar"
|
|
asset_name: KotlinPublicationScriptsBuilder-linux-x64.jar
|
|
asset_content_type: application/java-archive
|