Skip to content

Commit

Permalink
[RFR-405] Update CI workflow and upgrade dependencies (#30)
Browse files Browse the repository at this point in the history
* Update CI workflow (no release branch, auto-tag version)

* Upgrade dependencies

* Fix typo
  • Loading branch information
hb0 committed Apr 20, 2023
1 parent 32b15a5 commit 6ebd7b6
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 43 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/build.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/gradle_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow ensures the building step works
#
# @author Armin Schnabel
# @version 1.0.0
# @since 1.0.0
name: Gradle Build

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'

- name: Build with Gradle
run: ./gradlew build
env:
USERNAME: ${{ github.actor }}
PASSWORD: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,18 +1,34 @@
name: Publish to GitHub Packages
# This workflow publishes a new version to the Github Registry.
#
# @author Armin Schnabel
# @version 1.0.0
# @since 1.0.0
name: Gradle Publish

on:
on:
push:
tags:
- '*'
- '[0-9]+.[0-9]+.[0-9]+*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'zulu'
java-version: '11'

# version is required to publish artifacts to Github Registry
- name: Set version
run: |
sed -i "s/0.0.0/${{ github.ref_name }}/g" VERSION
sed -i "s/pod 'Protos', '~> 0.0.0'/pod 'Protos', '~> ${{ github.ref_name }}'/g" README.adoc
# Publish slim JARS to Github Package Registry
- name: Publish package
Expand All @@ -22,7 +38,8 @@ jobs:
PASSWORD: ${{ secrets.GITHUB_TOKEN }}

# Automatically mark this tag as release on Github
- uses: actions/create-release@v1
- name: Mark tag as release on Github
uses: actions/create-release@v1
id: create_release
with:
tag_name: ${{ github.ref }}
Expand Down
4 changes: 2 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Swift classes may be generated using link:https://github.com/apple/swift-protobu
You can include the `.proto` file with your Swift project from the Cyface custom Pod repository: `https://github.com/cyface-de/ios-podspecs.git` using CocoaPods:

```
pod 'Protos', '~> 2.1.0'
pod 'Protos', '~> 0.0.0'
```

Using a custom Pods repository is explained on the link:https://guides.cocoapods.org/making/private-cocoapods.html[CocoaPods Website].
Expand All @@ -88,7 +88,7 @@ link:https://developers.google.com/protocol-buffers/docs/javatutorial#builders[S
[#_licensing]
== Licensing

Copyright 2021-2022 Cyface GmbH
Copyright 2021-2023 Cyface GmbH

This file is part of the Cyface Protobuf Messages.

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.0
0.0.0
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021-2022 Cyface GmbH
* Copyright 2021-2023 Cyface GmbH
*
* This file is part of the Cyface Protobuf Messages.
*
Expand All @@ -20,7 +20,7 @@
* The root build gradle file.
*
* @author Armin Schnabel
* @version 1.0.1
* @version 1.0.2
* @since 1.0.0
*/
buildscript {
Expand All @@ -36,7 +36,7 @@ plugins {
id 'maven-publish'
//noinspection SpellCheckingInspection
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'com.google.protobuf' version '0.8.18'
id 'com.google.protobuf' version '0.9.2'
}

group = 'de.cyface'
Expand All @@ -52,11 +52,11 @@ tasks.withType(JavaCompile) {
ext {
commonsLangVersion = '3.12.0'
gradleWrapperVersion = '7.4.2'
protobufVersion = '3.21.1'
protobufVersion = '3.22.2'

// Versions of testing dependencies
junitVersion = '5.8.2'
mockitoVersion = '4.6.0'
junitVersion = '5.9.2'
mockitoVersion = '5.2.0'
hamcrestVersion = '2.2'
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 6ebd7b6

Please sign in to comment.