release 3.2.1, second attempt #36
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Jandex Release | |
on: | |
pull_request: | |
types: | |
- closed | |
paths: | |
- '.github/project.yml' | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
if: ${{github.event.pull_request.merged == true}} | |
env: | |
GITHUB_TOKEN: ${{secrets.RELEASE_TOKEN}} | |
steps: | |
- name: Retrieve project metadata | |
id: metadata | |
uses: radcortez/project-metadata-action@main | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
metadata-file-path: '.github/project.yml' | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{secrets.RELEASE_TOKEN}} | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
server-id: 'oss.sonatype' | |
server-username: 'MAVEN_DEPLOY_USERNAME' | |
server-password: 'MAVEN_DEPLOY_TOKEN' | |
gpg-private-key: ${{secrets.MAVEN_GPG_PRIVATE_KEY}} | |
gpg-passphrase: 'MAVEN_GPG_PASSPHRASE' | |
- name: Set up Maven | |
uses: stCarolas/setup-maven@v5 | |
with: | |
maven-version: 3.8.7 | |
- name: Maven release ${{steps.metadata.outputs.current-version}} | |
env: | |
MAVEN_DEPLOY_USERNAME: ${{secrets.MAVEN_DEPLOY_USERNAME}} | |
MAVEN_DEPLOY_TOKEN: ${{secrets.MAVEN_DEPLOY_TOKEN}} | |
MAVEN_GPG_PASSPHRASE: ${{secrets.MAVEN_GPG_PASSPHRASE}} | |
run: | | |
export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED" | |
java -version | |
mvn --version | |
git config --global user.name "SmallRye CI" | |
git config --global user.email "smallrye@googlegroups.com" | |
git checkout -b release | |
sed -i -e 's|<version.jandex>.*</version.jandex>|<version.jandex>${{steps.metadata.outputs.current-version}}</version.jandex>|' benchmarks/pom.xml | |
sed -i -e 's|^version: main|version: ${{steps.metadata.outputs.current-version}}|' doc/antora.yml | |
git commit -a -m 'Amendments before release' | |
mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}} | |
git checkout ${{github.base_ref}} | |
git rebase release | |
mvn -B release:perform -Prelease | |
sed -i -e 's|<version.jandex>.*</version.jandex>|<version.jandex>${project.version}</version.jandex>|' benchmarks/pom.xml | |
sed -i -e 's|^version: ${{steps.metadata.outputs.current-version}}|version: main|' doc/antora.yml | |
git commit -a -m 'Amendments after release' | |
git push | |
git push --tags | |
- name: Milestone release | |
uses: radcortez/milestone-release-action@main | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
milestone-title: ${{steps.metadata.outputs.current-version}} | |
milestone-next: ${{steps.metadata.outputs.next-version}} | |
github-pages: | |
name: GitHub Pages | |
needs: | |
- release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
- name: Set up Node.js 16 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- name: Generate and push | |
run: | | |
node --version | |
curl -s -L -o antora-playbook.yml https://github.com/smallrye/jandex/blob/main/doc/antora-playbook-prod.yml?raw=true | |
npm install @antora/cli@3.0 @antora/site-generator-default@3.0 | |
npx antora generate antora-playbook.yml | |
rm -rf node_modules docs package.json package-lock.json antora-playbook.yml | |
mv -T build/site docs | |
touch docs/.nojekyll | |
git config --global user.name "SmallRye CI" | |
git config --global user.email "smallrye@googlegroups.com" | |
git status | |
git add -A . | |
git commit -m 'Generate documentation site' | |
git push |