Skip to content

Commit bb073e9

Browse files
authored
Update release script (#233)
1 parent 9bde18c commit bb073e9

File tree

6 files changed

+94
-94
lines changed

6 files changed

+94
-94
lines changed
-856 Bytes
Binary file not shown.

.github/workflows/build.yml

Lines changed: 33 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build
33
on:
44
push:
55
branches:
6-
- "master"
6+
- "main"
77
paths-ignore:
88
- '.gitignore'
99
- 'CODEOWNERS'
@@ -13,7 +13,6 @@ on:
1313
- '*.txt'
1414
- '.all-contributorsrc'
1515
pull_request:
16-
types: [opened, synchronize, reopened]
1716
paths-ignore:
1817
- '.gitignore'
1918
- 'CODEOWNERS'
@@ -23,44 +22,38 @@ on:
2322
- '*.txt'
2423
- '.all-contributorsrc'
2524

26-
jobs:
27-
build:
25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.ref }}
27+
cancel-in-progress: true
2828

29-
runs-on: ubuntu-latest
29+
defaults:
30+
run:
31+
shell: bash
3032

33+
jobs:
34+
build:
35+
name: Build on ${{ matrix.os }}
36+
strategy:
37+
fail-fast: false
38+
matrix:
39+
# os: [windows-latest, macos-latest, ubuntu-latest]
40+
os: [ubuntu-latest]
41+
runs-on: ${{ matrix.os }}
3142
steps:
32-
- uses: actions/checkout@v2
33-
with:
34-
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
35-
36-
- name: Set up JDK 11
37-
uses: actions/setup-java@v1
38-
with:
39-
java-version: 11
40-
41-
# - name: Cache SonarCloud packages
42-
# uses: actions/cache@v1
43-
# with:
44-
# path: ~/.sonar/cache
45-
# key: ${{ runner.os }}-sonar
46-
# restore-keys: ${{ runner.os }}-sonar
47-
48-
- name: Get Date
49-
id: get-date
50-
run: |
51-
echo "::set-output name=date::$(/bin/date -u "+%Y-%m")"
52-
shell: bash
53-
- name: Cache Maven Repository
54-
id: cache-maven
55-
uses: actions/cache@v2
56-
with:
57-
path: ~/.m2/repository
58-
# refresh cache every month to avoid unlimited growth
59-
key: maven-repo-${{ runner.os }}-${{ steps.get-date.outputs.date }}
60-
61-
- name: Build and analyze
62-
# env:
63-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
64-
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
65-
66-
run: mvn -B -Pnative impsort:check formatter:validate verify # org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
43+
- name: Prepare git
44+
run: git config --global core.autocrlf false
45+
if: startsWith(matrix.os, 'windows')
46+
47+
- uses: actions/checkout@v3
48+
- name: Set up JDK 11
49+
uses: actions/setup-java@v3
50+
with:
51+
distribution: temurin
52+
java-version: 11
53+
cache: 'maven'
54+
55+
- name: Build with Maven
56+
run: mvn -B clean install -Dno-format
57+
58+
- name: Build with Maven (Native)
59+
run: mvn -B install -Dnative -Dquarkus.native.container-build -Dnative.surefire.skip

.github/workflows/pre-release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ on:
55
paths:
66
- '.github/project.yml'
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
defaults:
13+
run:
14+
shell: bash
15+
816
jobs:
917
release:
1018
runs-on: ubuntu-latest
Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
name: "Quarkus ecosystem CI"
22
on:
3+
workflow_dispatch:
34
watch:
45
types: [started]
56

6-
# For this CI to work, ECOSYSTEM_CI_TOKEN needs to contain a GitHub with rights to close the Quarkus issue that the user/bot has opened,
7-
# while 'ECOSYSTEM_CI_REPO_PATH' needs to be set to the corresponding path in the 'quarkusio/quarkus-ecosystem-ci' repository
7+
# For this CI to work, ECOSYSTEM_CI_TOKEN needs to contain a GitHub with rights to close the Quarkus issue that the user/bot has opened,
8+
# while 'ECOSYSTEM_CI_REPO_PATH' needs to be set to the corresponding path in the 'quarkusio/quarkus-ecosystem-ci' repository
89

910
env:
1011
ECOSYSTEM_CI_REPO: quarkusio/quarkus-ecosystem-ci
@@ -15,35 +16,45 @@ env:
1516
# Repo specific setting #
1617
#########################
1718

18-
ECOSYSTEM_CI_REPO_PATH: quarkus-logging-json
19+
ECOSYSTEM_CI_REPO_PATH: quarkiverse-logging-json
20+
21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.ref }}
23+
cancel-in-progress: true
24+
25+
defaults:
26+
run:
27+
shell: bash
1928

2029
jobs:
2130
build:
2231
name: "Build against latest Quarkus snapshot"
2332
runs-on: ubuntu-latest
24-
if: github.actor == 'quarkusbot' || github.actor == 'quarkiversebot'
33+
# Allow <ADMIN> to manually launch the ecosystem CI in addition to the bots
34+
if: github.actor == 'quarkusbot' || github.actor == 'quarkiversebot' || github.actor == '<ADMIN>'
2535

2636
steps:
2737
- name: Install yq
28-
run: sudo add-apt-repository ppa:rmescandon/yq && sudo apt update && sudo apt install yq -y
38+
uses: dcarbone/install[email protected]
2939

3040
- name: Set up Java
31-
uses: actions/setup-java@v1
41+
uses: actions/setup-java@v3
3242
with:
43+
distribution: temurin
3344
java-version: ${{ env.JAVA_VERSION }}
3445

3546
- name: Checkout repo
36-
uses: actions/checkout@v2
47+
uses: actions/checkout@v3
3748
with:
3849
path: current-repo
3950

4051
- name: Checkout Ecosystem
41-
uses: actions/checkout@v2
52+
uses: actions/checkout@v3
4253
with:
4354
repository: ${{ env.ECOSYSTEM_CI_REPO }}
4455
path: ecosystem-ci
4556

4657
- name: Setup and Run Tests
4758
run: ./ecosystem-ci/setup-and-test
4859
env:
49-
ECOSYSTEM_CI_TOKEN: ${{ secrets.ECOSYSTEM_CI_TOKEN }}
60+
ECOSYSTEM_CI_TOKEN: ${{ secrets.ECOSYSTEM_CI_TOKEN }}

.github/workflows/release.yml

Lines changed: 32 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -6,81 +6,69 @@ on:
66
paths:
77
- '.github/project.yml'
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
defaults:
14+
run:
15+
shell: bash
16+
917
jobs:
1018
release:
1119
runs-on: ubuntu-latest
1220
name: release
1321
if: ${{github.event.pull_request.merged == true}}
1422

1523
steps:
16-
- uses: radcortez/project-metadata-action@master
24+
- uses: radcortez/project-metadata-action@main
1725
name: Retrieve project metadata
1826
id: metadata
1927
with:
2028
github-token: ${{secrets.GITHUB_TOKEN}}
2129
metadata-file-path: '.github/project.yml'
2230

23-
- uses: actions/checkout@v2
31+
- uses: actions/checkout@v3
2432

2533
- name: Import GPG key
2634
id: import_gpg
27-
uses: crazy-max/ghaction-import-gpg@v3
35+
uses: crazy-max/ghaction-import-gpg@v5
2836
with:
29-
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
37+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
3038
passphrase: ${{ secrets.GPG_PASSPHRASE }}
3139

32-
- uses: actions/[email protected]
40+
- name: Set up JDK 11
41+
uses: actions/setup-java@v3
3342
with:
43+
distribution: temurin
3444
java-version: 11
35-
36-
- name: Cache local Maven repository
37-
uses: actions/cache@v2
38-
with:
39-
path: ~/.m2/repository
40-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
41-
restore-keys: |
42-
${{ runner.os }}-maven-
45+
cache: 'maven'
46+
server-id: ossrh
47+
server-username: MAVEN_USERNAME
48+
server-password: MAVEN_PASSWORD
4349

4450
- name: Configure Git author
4551
run: |
4652
git config --local user.email "[email protected]"
4753
git config --local user.name "GitHub Action"
4854
49-
- name: Maven release ${{steps.metadata.outputs.current-version}}
55+
- name: Update latest release version in docs
5056
run: |
51-
gpg --quiet --batch --yes --decrypt --passphrase="${{secrets.GPG_PASSPHRASE}}" --output maven-settings.xml .github/release/maven-settings.xml.gpg
52-
git checkout -b release
53-
mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}} -s maven-settings.xml
57+
mvn -B -ntp -pl docs -am generate-resources -Denforcer.skip -Dformatter.skip -Dimpsort.skip
5458
if ! git diff --quiet docs/modules/ROOT/pages/includes/attributes.adoc; then
5559
git add docs/modules/ROOT/pages/includes/attributes.adoc
56-
git commit -m "Update stable version for documentation"
60+
git commit -m "Update the latest release version ${{steps.metadata.outputs.current-version}} in documentation"
5761
fi
58-
git checkout ${{github.base_ref}}
59-
git rebase release
60-
mvn -B release:perform -Darguments=-DperformRelease -Prelease -s maven-settings.xml
6162
62-
- name: Adjust tag for documentation changes
63+
- name: Maven release ${{steps.metadata.outputs.current-version}}
6364
run: |
64-
git checkout ${{steps.metadata.outputs.current-version}}
65-
mvn -B clean install -DskipTests -DskipITs
66-
if ! git diff --quiet docs/modules/ROOT/pages/includes/attributes.adoc; then
67-
git add docs/modules/ROOT/pages/includes/attributes.adoc
68-
git commit -m "Update stable version for documentation"
69-
# Move the tag after inclusion of documentation adjustments
70-
git tag -f ${{steps.metadata.outputs.current-version}}
71-
fi
72-
# Go back to master
73-
git checkout master
74-
75-
- name: Push changes to ${{github.base_ref}}
76-
uses: ad-m/[email protected]
77-
with:
78-
github_token: ${{ secrets.GITHUB_TOKEN }}
79-
branch: ${{github.base_ref}}
65+
mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}}
66+
mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease
67+
env:
68+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
69+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
8070

81-
- name: Push tags
82-
uses: ad-m/[email protected]
83-
with:
84-
github_token: ${{ secrets.GITHUB_TOKEN }}
85-
tags: true
86-
branch: ${{github.base_ref}}
71+
- name: Push changes to ${{github.base_ref}} branch
72+
run: |
73+
git push
74+
git push origin ${{steps.metadata.outputs.current-version}}

docs/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<executions>
5757
<execution>
5858
<id>copy-resources</id>
59-
<phase>prepare-package</phase>
59+
<phase>generate-resources</phase>
6060
<goals>
6161
<goal>copy-resources</goal>
6262
</goals>

0 commit comments

Comments
 (0)