Skip to content

Commit

Permalink
feat: automate releases
Browse files Browse the repository at this point in the history
  • Loading branch information
manosbatsis committed Dec 29, 2023
1 parent caa40ab commit cb1cf9e
Show file tree
Hide file tree
Showing 4 changed files with 8,218 additions and 21 deletions.
36 changes: 15 additions & 21 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,37 +38,31 @@ jobs:
with:
arguments: build

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
if: ${{ matrix.java-version == '8' && matrix.os == 'ubuntu-latest' }}
- name: Setup Node.js
uses: actions/setup-node@v3
if: github.ref == 'refs/heads/master'
with:
token: ${{secrets.CODECOV_TOKEN}}
files: ./build/reports/kover/report.xml
node-version: 18.x
cache: "npm"

- name: Install npm dependencies
if: github.ref == 'refs/heads/master'
run: npm install

- name: Identify current version
id: current_version
uses: christian-draeger/read-properties@1.0.1
with:
path: './gradle.properties'
property: 'release_version'

- name: Temporarily set snapshot version
if: ${{ github.event_name == 'push' && matrix.os == 'ubuntu-latest' }}
uses: christian-draeger/write-properties@1.0.1
with:
path: './gradle.properties'
property: 'release_version'
value: ${{steps.current_version.outputs.value}}-SNAPSHOT
- name: Update and tag version
if: github.ref == 'refs/heads/master'
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: gradle/gradle-build-action@v2
if: github.ref == 'refs/heads/master'
name: Publish snapshot to Maven Central
if: ${{ github.event_name == 'push' && matrix.os == 'ubuntu-latest' }}
env:
ORG_GRADLE_PROJECT_signingKey: ${{secrets.ORG_GRADLE_PROJECT_SIGNINGKEY}}
ORG_GRADLE_PROJECT_signingKeyId: ${{secrets.ORG_GRADLE_PROJECT_SIGNINGKEYID}}
ORG_GRADLE_PROJECT_signingPassword: ${{secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD}}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{secrets.ORG_GRADLE_PROJECT_SONATYPEUSERNAME}}
ORG_GRADLE_PROJECT_sonatypePassword: ${{secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD}}
with:
arguments: publishToSonatype
arguments: publishToSonatype closeAndReleaseSonatypeStagingRepositor
Empty file added docs/.gitkeep
Empty file.
Loading

0 comments on commit cb1cf9e

Please sign in to comment.