Release #1
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: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
dryRun: | |
type: boolean | |
description: "Dry-Run" | |
default: false | |
concurrency: | |
# only run one publishing at a time to avoid conflicts | |
group: publish-${{ github.ref }} | |
env: | |
# renovate: datasource=npm depName=@semantic-release/changelog | |
SEMANTIC_RELEASE_CHANGELOG_VERSION: 6.0.3 | |
# renovate: datasource=npm depName=@semantic-release/exec | |
SEMANTIC_RELEASE_EXEC_VERSION: 6.0.3 | |
# renovate: datasource=npm depName=@semantic-release/git | |
SEMANTIC_RELEASE_GIT_VERSION: 10.0.1 | |
# renovate: datasource=npm depName=conventional-changelog-conventionalcommits | |
CONVENTIONAL_CHANGELOG_CONVENTIONALCOMMITS_VERSION: 8.0.0 | |
jobs: | |
release: | |
# Only on main repository (don't release on forks) | |
if: github.repository_owner == 'stempler' | |
runs-on: ubuntu-latest | |
outputs: | |
release-published: ${{ steps.release.outputs.new_release_published }} | |
release-version: ${{ steps.release.outputs.new_release_version }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
# fetch-depth 0 is required to fetch all tags (and to determine the version based on tags) | |
fetch-depth: 0 | |
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1 | |
- name: Setup NodeJs | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version: 20 | |
- name: Test with Gradle | |
run: ./gradlew clean check | |
# https://github.com/marketplace/actions/junit-report-action | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@a427a90771729d8f85b6ab0cdaa1a5929cab985d # v5.0.0 | |
if: always() # always run even if the previous step fails | |
with: | |
report_paths: 'build/test-results/**/*.xml' | |
require_tests: true # currently no tests present | |
annotate_only: true | |
detailed_summary: true | |
fail_on_failure: true | |
- name: Determine app token for release | |
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0 | |
id: app-token | |
with: | |
app-id: ${{ secrets.RELEASE_GITHUB_APP_ID }} | |
private-key: "${{ secrets.RELEASE_GITHUB_PRIVATE_KEY }}" | |
- name: Release | |
id: release | |
uses: cycjimmy/semantic-release-action@b1b432f13acb7768e0c8efdec416d363a57546f2 # v4.1.1 | |
env: | |
# Permissions needed | |
# contents: write | |
# issues: write | |
# pull-requests: write | |
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | |
# GIT_AUTHOR_NAME: wetransform Bot | |
# GIT_AUTHOR_EMAIL: [email protected] | |
# GIT_COMMITTER_NAME: wetransform Bot | |
# GIT_COMMITTER_EMAIL: [email protected] | |
RUNNER_DEBUG: 1 | |
# For Gradle execution | |
# CI marker | |
CI: 'true' | |
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }} | |
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} | |
# in-memory key | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SONATYE_PGP_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SONATYE_PGP_PRIVATE_KEY }} | |
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }} | |
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }} | |
with: | |
dry_run: ${{ inputs.dryRun }} | |
semantic_version: 24.2.0 | |
extra_plugins: | |
"@semantic-release/changelog@\ | |
${{ env.SEMANTIC_RELEASE_CHANGELOG_VERSION }} \ | |
@semantic-release/exec@\ | |
${{ env.SEMANTIC_RELEASE_EXEC_VERSION }} \ | |
@semantic-release/git@\ | |
${{ env.SEMANTIC_RELEASE_GIT_VERSION }} \ | |
conventional-changelog-conventionalcommits@\ | |
${{ env.CONVENTIONAL_CHANGELOG_CONVENTIONALCOMMITS_VERSION }} \ | |
" |