Skip to content

Commit

Permalink
NH-76572 - Removed maven release plugin (#6)
Browse files Browse the repository at this point in the history
* Removed maven release plugin
* Updated Makefile
  • Loading branch information
jerrytfleung authored Jun 13, 2024
1 parent 866d75a commit 632ba12
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 39 deletions.
37 changes: 15 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Release
on:
push:
branches: [ "main" ]
workflow_dispatch:
tags:
- v*

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run make
run: make
- name: Run make check
Expand All @@ -17,34 +17,27 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
- name: Configure git
- name: Set Version
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Prepare release
run: mvn --batch-mode release:prepare
version=$(echo ${{ github.ref_name }} | sed 's/^v//')
mvn versions:set -DnewVersion=$version -B
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Publish to GitHub Packages Apache Maven
run: mvn deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Perform release
run: mvn --batch-mode release:perform
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Figure out the project version from pom.xml
run: |
# Go back to the commit before the SNAPSHOT
git reset --hard HEAD~1
echo "VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> "$GITHUB_ENV"
GITHUB_TOKEN: ${{ github.token }} # GITHUB_TOKEN is the default env for the password
- name: Create Release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: apm-proto-${{ env.VERSION }}
release_name: apm-proto ${{ env.VERSION }}
tag_name: ${{ github.ref_name }}
release_name: apm-proto ${{ github.ref_name }}
draft: false
prerelease: false
2 changes: 1 addition & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run make
run: make
- name: Run make check
Expand Down
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pwd := $(shell pwd)

all: clean cpp go mockery doc
all: clean cpp go doc

.PHONY: cpp
cpp:
Expand All @@ -12,9 +12,6 @@ go:
@echo "Generating apm-library package for Go"
@docker run --user `id -u` --rm -v $(PWD):/defs namely/protoc-all:1.51_1 -d . -l go -o go
@docker run --rm -v "${PWD}":/apm-proto -w /apm-proto/go/collectorpb golang:1.21.0 sh -c "go mod init github.com/solarwinds/apm-proto/go/collectorpb && go mod tidy"

.PHONY: mockery
mockery:
@docker run --user `id -u` --rm -v "${PWD}/go/collectorpb":/src -w /src vektra/mockery --all --case=underscore

.PHONY: doc
Expand Down
2 changes: 1 addition & 1 deletion go/collectorpb/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21.0

require (
google.golang.org/grpc v1.64.0
google.golang.org/protobuf v1.34.1
google.golang.org/protobuf v1.34.2
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go/collectorpb/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY=
google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg=
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
12 changes: 3 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>cloud.solarwindscloud</groupId>
<groupId>com.solarwinds</groupId>
<artifactId>apm-proto</artifactId>
<version>1.0.4-SNAPSHOT</version>
<version>0.0.0-SNAPSHOT</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -116,14 +116,8 @@
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/solarwindscloud/apm-proto</url>
<url>https://maven.pkg.github.com/solarwinds/apm-proto</url>
</repository>
</distributionManagement>

<scm>
<connection>scm:git:https://github.com/solarwindscloud/apm-proto</connection>
<developerConnection>scm:git:https://github.com/solarwindscloud/apm-proto</developerConnection>
<tag>HEAD</tag>
</scm>

</project>

0 comments on commit 632ba12

Please # to comment.