-
Notifications
You must be signed in to change notification settings - Fork 186
70 lines (70 loc) · 2.7 KB
/
release.yml
File metadata and controls
70 lines (70 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Triggered Release
on:
workflow_dispatch:
inputs:
releaseVersion:
description: 'Release version to tag (e.g., 2.1.0). Will be used for release artifacts and git tag.'
required: true
developmentVersion:
description: 'Next development version (e.g., 2.2.0-SNAPSHOT). Will be used for continuing development after release.'
required: true
env:
OSS_USERNAME: ${{ secrets.OSS_USERNAME }}
OSS_PASSWORD: ${{ secrets.OSS_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
jobs:
# replaced by maven-release.yml
#release:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Set up JDK 11
# uses: actions/setup-java@v4
# with:
# distribution: 'zulu'
# java-version: 11
# cache: 'maven'
# # Value of the distributionManagement/repository/id field of the pom.xml
# server-id: central
# gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
# server-username: OSS_USERNAME
# server-password: OSS_PASSWORD
# gpg-passphrase: GPG_PASSPHRASE
# - name: Setup Git
# run: |
# git config --global committer.email "noreply@github.com"
# git config --global committer.name "GitHub Release"
# git config --global author.email "${GITHUB_ACTOR}@users.noreply.github.com"
# git config --global author.name "${GITHUB_ACTOR}"
# - name: Release
# run: ./mvnw -V -B -ntp -Prelease -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }} release:prepare release:perform
# - name: Rollback on failure
# if: ${{ failure() }}
# run: |
# ./mvnw -B release:rollback -Prelease -Dgpg.passphrase=${{secrets.GPG_PASSPHRASE}}
# echo "You may need to manually delete the GitHub tag, if it was created."
docker:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.releaseVersion }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build & Push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
openapitools/openapi-diff:${{ github.event.inputs.releaseVersion }}
openapitools/openapi-diff:latest