Skip to content

Commit cb518b7

Browse files
authored
Add Release GitHub Actions job (#265)
1 parent 6f3277e commit cb518b7

File tree

3 files changed

+41
-2
lines changed

3 files changed

+41
-2
lines changed

.github/workflows/build.yml renamed to .github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: build and test
1+
name: ci
22

33
on:
44
push:

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: release
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
release-tag:
6+
description: 'Version to release'
7+
required: true
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
java: [ '21' ]
15+
architecture: [ 'x64' ]
16+
17+
name: Release ${{ github.event.inputs.release-tag }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
ref: ${{ github.event.inputs.release-tag }}
22+
23+
- name: Setup JDK
24+
uses: actions/setup-java@v4
25+
with:
26+
distribution: 'temurin'
27+
java-version: '21'
28+
cache: 'maven'
29+
server-id: central
30+
server-username: CENTRAL_USERNAME
31+
server-password: CENTRAL_PASSWORD
32+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
33+
34+
- name: Deploy Snapshot
35+
run: mvn -B --no-transfer-progress -Pmaven-central-release -DskipTests=true deploy
36+
env:
37+
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
38+
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
39+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# vavr-jackson
22

3-
[![Build](https://github.com/vavr-io/vavr-jackson/actions/workflows/build.yml/badge.svg)](https://github.com/vavr-io/vavr-jackson/actions/workflows/build.yml)
3+
[![Build](https://github.com/vavr-io/vavr-jackson/actions/workflows/ci.yml/badge.svg)](https://github.com/vavr-io/vavr-jackson/actions/workflows/ci.yml)
44
![Maven Central Version](https://img.shields.io/maven-central/v/io.vavr/vavr-jackson?versionPrefix=0)
55
[![Coverage Status](https://codecov.io/github/vavr-io/vavr-jackson/coverage.svg?branch=master)](https://codecov.io/github/vavr-io/vavr-jackson?branch=master)
66

0 commit comments

Comments
 (0)