Skip to content

build: Update GH workflows #13

build: Update GH workflows

build: Update GH workflows #13

Workflow file for this run

#
# SPDX-License-Identifier: Apache-2.0
#
# Copyright 2006-2024 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: EarlyAccess
on:
push:
branches: [ master ]
env:
JAVA_VERSION: '11'
JAVA_DISTRO: 'zulu'
jobs:
earlyaccess:
name: EarlyAccess
if: github.repository == 'kordamp/json-lib' && startsWith(github.event.head_commit.message, 'Releasing version') != true
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cancel previous run
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}
cache: gradle
- name: Build
run: ./gradlew -Prelease=true build -S
- name: Version
id: vars
run: echo ::set-output name=version::$(cat VERSION)
- name: Release
uses: jreleaser/release-action@v2
with:
arguments: release
env:
JRELEASER_PROJECT_VERSION: ${{ steps.vars.outputs.version }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
- name: JReleaser output
if: always()
uses: actions/upload-artifact@v4
with:
name: artifact
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties