forked from real-logic/aeron
-
Notifications
You must be signed in to change notification settings - Fork 0
160 lines (151 loc) · 4.59 KB
/
release.yml
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: Release
on:
workflow_dispatch:
push:
tags:
- "*.*.*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
env:
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.java.installations.auto-detect=false -Dorg.gradle.warning.mode=fail'
jobs:
ci:
uses: ./.github/workflows/ci.yml
permissions:
contents: read
ci-low-cadence:
uses: ./.github/workflows/ci-low-cadence.yml
permissions:
contents: read
codeql:
uses: ./.github/workflows/codeql.yml
permissions:
actions: read
contents: read
security-events: write
github-release:
name: Create Github Release
permissions:
contents: write
needs: [ ci, ci-low-cadence, codeql ]
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create-release.outputs.upload_url }}
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- id: create-release
name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
release-java:
name: Release java artifacts
permissions:
contents: read
packages: write
needs: github-release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Publish with Gradle
run: ./gradlew publish
env:
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.SONATYPE_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.SONATYPE_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_RSA_SIGN_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_RSA_SIGN_KEYPASS }}
release-c:
name: Release c artifacts
permissions:
contents: write
id-token: write
packages: write
needs: github-release
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- distro: ubuntu
version: 20.04
gcc-version: default
- distro: ubuntu
version: 22.04
gcc-version: default
- distro: debian
version: bullseye
gcc-version: default
- distro: debian
version: bookworm
gcc-version: default
- distro: rocky
version: 8.9
gcc-version: 10
- distro: rocky
version: 9.3
gcc-version: 13
- distro: awslinux
version: 2023
gcc-version: default
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Artifacts Using Docker
uses: docker/build-push-action@v6
with:
context: .
file: ./cppbuild/${{ matrix.distro }}/Dockerfile
pull: true
shm-size: 1g
outputs: type=local,dest=build
target: essentials-artifacts
build-args: |
VERSION=${{ matrix.version }}
GCC_VERSION=${{ matrix.gcc-version }}
- name: Rename artifact
run: |
artifact_name=aeron-$(cat version.txt)-${{ matrix.distro }}-${{ matrix.version }}-x86_64.tar.gz
echo "artifact_name=$artifact_name" >> $GITHUB_ENV
mv ./build/*.tar.gz ./build/$artifact_name
# - name: Upload to Github Release
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ needs.github-release.outputs.upload_url }}
# asset_path: ./build/${{ env.artifact_name }}
# asset_name: ${{ env.artifact_name }}
# asset_content_type: application/gzip
- name: Setup JFrog CLI
uses: jfrog/setup-jfrog-cli@v4
env:
JF_URL: ${{ vars.JFROG_OIDC_URL }}
with:
oidc-provider-name: ${{ vars.JFROG_OIDC_PROVIDER }}
oidc-audience: ${{ vars.JFROG_OIDC_AUDIENCE }}
- name: Publish Build info With JFrog CLI
run: jf rt u *.tar.gz ${{ vars.JFROG_AERON_OSS_REPO_NAME }}
working-directory: ./build