Skip to content

Commit

Permalink
[skip ci] Add release.yml GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
burnoo committed Aug 4, 2024
1 parent 6fedc26 commit ff3b404
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release Library

on:
workflow_dispatch:

env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

permissions:
contents: write

jobs:
release:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '17'

- name: Set up Gradle
uses: gradle/gradle-build-action@v3

# - name: Publish artifacts to Sonatype
# run: ./gradlew publishAllPublicationsToSonatypeRepository

- name: Extract version from build.gradle.kts
id: extract_version
run: |
version=$(sed -n 's/.*version = "\([0-9.]*\).*/\1/p' compose-remember-setting/build.gradle.kts)
echo "VERSION=$version" >> $GITHUB_ENV
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.TOKEN_RELEASES }}
tag: ${{ env.VERSION }}
commit: ${{ github.sha }}
generateReleaseNotes: true
makeLatest: true

0 comments on commit ff3b404

Please sign in to comment.