Prepare publish of com.gradleup.shadow (#930) #2
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: | |
push: | |
tags: | |
- '**' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
if: github.repository == 'GradleUp/shadow' | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 21 | |
- uses: gradle/actions/setup-gradle@v4 | |
with: | |
cache-read-only: true | |
- uses: actions/setup-node | |
with: | |
# Due to some limitations of https://github.com/node-gradle/gradle-node-plugin. | |
node-version: '16' | |
# Disable CC due to https://github.com/gradle/gradle/issues/22779 | |
- run: ./gradlew release --no-configuration-cache | |
env: | |
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_KEY }} | |
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_SECRET }} | |
# https://ajoberstar.org/grgit/main/grgit-authentication.html#_environment_variables | |
GRGIT_USER: ${{ secrets.GITHUB_TOKEN }} | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USER }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_KEY_PASSWORD }} | |
- name: Extract release notes | |
uses: ffurrer2/extract-release-notes@v2 | |
with: | |
changelog_file: src/docs/changes/README.md | |
release_notes_file: RELEASE_NOTES.md | |
- name: Create release | |
run: gh release create ${{ github.ref_name }} --notes-file RELEASE_NOTES.md | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |