Skip to content

Merge pull request #84 from growthbook/november #41

Merge pull request #84 from growthbook/november

Merge pull request #84 from growthbook/november #41

Workflow file for this run

name: Release
on:
push:
branches:
- 'main'
tags-ignore:
- '**'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
clean: 'true'
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.7
with:
versionSpec: '5.x'
- uses: actions/setup-java@v1
with:
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.7
with:
useConfigFile: true
configFilePath: ./.github/gitversion.yml
- name: Gradle clean
run: ./gradlew clean --info
- name: Build with Gradle
run: ./gradlew -Pversion=${{ steps.gitversion.outputs.SemVer }} build --info
- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ steps.gitversion.outputs.SemVer }}
tag_name: ${{ steps.gitversion.outputs.SemVer }}
body: ${{ github.event.head_commit.message }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to maven central
run: |
GPG_PRIVATE_KEY="${{secrets.GPG_PRIVATE_KEY}}" GPG_PRIVATE_PASSWORD="${{secrets.GPG_PRIVATE_PASSWORD}}" GB_SONATYPE_USERNAME='${{secrets.GB_SONATYPE_USERNAME}}' GB_SONATYPE_PASSWORD='${{secrets.GB_SONATYPE_PASSWORD}}' ./gradlew -Pversion=${{ steps.gitversion.outputs.SemVer }} publish
- name: Upload binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: GrowthBook/build/libs/GrowthBook-${{ steps.gitversion.outputs.SemVer }}.jar
asset_name: GrowthBook-${{ steps.gitversion.outputs.SemVer }}.jar
asset_content_type: application/x-jar
- name: Upload sources
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: GrowthBook/build/libs/GrowthBook-kotlin-${{ steps.gitversion.outputs.SemVer }}-sources.jar
asset_name: GrowthBook-kotlin-${{ steps.gitversion.outputs.SemVer }}-sources.jar
asset_content_type: application/x-jar
- name: Upload metadata
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: GrowthBook/build/libs/GrowthBook-metadata-${{ steps.gitversion.outputs.SemVer }}-all.jar
asset_name: GrowthBook-metadata-${{ steps.gitversion.outputs.SemVer }}-all.jar
asset_content_type: application/x-jar