Skip to content

[Fixes #25] Automates tags/releases #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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: Create a Release Tag

on:
push:
branches: [ release ]

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Setup fake Credentials
run: cp gradle.properties.fake gradle.properties
- name: Build with Gradle
run: chmod +x gradlew && ./gradlew check
- name: Create a Release Tag
run: ./make-tag.sh

# TODO: Automatically push the build artifacts to the nexus repository
File renamed without changes.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ task logCoverageRatio {

allprojects {
group 'com.alertavert'
version '0.7.4'
version '0.7.4-1'

sourceCompatibility = JavaVersion.VERSION_17

Expand Down
18 changes: 18 additions & 0 deletions get-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
#
# Copyright (c) 2022 AlertAvert.com. All rights reserved.
# Author: Marco Massenzio ([email protected])
#
# Usage: get-version [build]
# Extracts version from build.gradle
#
# build is the path to the build.gradle file, defaults to ./build.gradle

set -eu

build=${1:-build.gradle}

# Note the use of -E to enable "extended" RegExps syntax (* and ?).
grep -E '^[[:blank:]]*version' ${build} |\
sed -E 's/^[[:blank:]]*version[[:blank:]]*=?[[:blank:]]*//' |\
sed "s/'//g" | sed 's/[[:blank:]]*$//'
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
20 changes: 1 addition & 19 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
#
# Copyright (c) 2021 AlertAvert.com. All rights reserved.
#
# 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
#
# http://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.
#
# Author: Marco Massenzio ([email protected])
#

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading