Fix espresso release #15
Workflow file for this run
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: Espresso (Release) | |
on: | |
workflow_dispatch: | |
inputs: | |
releaseType: | |
description: 'Release type - major, minor or patch' | |
required: true | |
default: 'patch' | |
options: | |
- 'major' | |
- 'minor' | |
- 'patch' | |
pull_request: | |
branches: | |
- main | |
defaults: | |
run: | |
working-directory: visual-espresso | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: espresso-release | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
server-id: ossrh | |
# gpg-private-key: ${{ secrets.MVN_CENTRAL_GPG_PRIVATE_KEY }} | |
# gpg-passphrase: ${{ secrets.MVN_CENTRAL_GPG_PASSPHRASE }} | |
- name: Set up Git | |
if: ${{ steps.prep.outputs.tag_name == '' }} | |
run: | | |
git config --global user.name "sauce-visual-bot" | |
git config --global user.email "[email protected]" | |
- name: Set up Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Bump version | |
id: upgrade | |
run: | | |
new_version=$(./gradlew -q bumpVersion -PreleaseType=patch) | |
echo "version=$new_version" >> "$GITHUB_OUTPUT" | |
- name: Publish artifact | |
run: ./gradlew publishToMavenCentral --no-configuration-cache | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MVN_CENTRAL_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MVN_CENTRAL_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.MVN_CENTRAL_GPG_PRIVATE_KEY }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.MVN_CENTRAL_GPG_PASSPHRASE }} | |
- name: Check if .aar is created | |
run: | | |
if [ -f visual-espresso/visual/build/outputs/aar/visual-release.aar ]; then | |
echo "File exists!" | |
else | |
echo "File does not exist." | |
exit 1 | |
fi | |
#- name: Push new version to Git | |
# id: push_to_git | |
# run: | | |
# tag_name="espresso-${{ steps.upgrade.outputs.version }}" | |
# git add ./build.gradle | |
# git commit -m "[release] $tag_name" | |
# git tag $tag_name | |
# git push | |
# git push origin $tag_name | |
# echo "tag_name=$tag_name" >> "$GITHUB_OUTPUT" | |
#- name: Github Release | |
# uses: softprops/action-gh-release@v2 | |
# with: | |
# fail_on_unmatched_files: true | |
# tag_name: ${{ steps.push_to_git.outputs.tag_name }} | |
# files: visual-espresso/visual/build/outputs/aar/visual-release.aar | |
# generate_release_notes: true |