Skip to content

[ Start ] Release artifacts, Build & Deploy #3

[ Start ] Release artifacts, Build & Deploy

[ Start ] Release artifacts, Build & Deploy #3

Workflow file for this run

#
name: '[ RELEASE ] Package & Deploy'
on:
workflow_dispatch:
inputs:
BUILD_VERSION:
description: 'The version to build and deploy'
required: true
default: '0-SNAPSHOT'
release:
types: [created]
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
jobs:
ReleaseVersion:
runs-on: ubuntu-latest
outputs:
build_version: ${{ steps.release_version.outputs.build_version }}
steps:
- name: "Release Version"
id: release_version
run: |
VERSION=${RELEASE_TAG#v}
echo "BUILD_VERSION=${RELEASE_TAG#v}" >> "$GITHUB_ENV"
echo "BUILD_VERSION=${RELEASE_TAG#v}" >> "$GITHUB_OUTPUT"
echo "Release version is $VERSION"
- name: Print output variables
run: |
echo BUILD_VERSION: ${{ steps.release_version.outputs.build_version }}
Build:
uses: ./.github/workflows/build.yml
with:
build_version: ${{ needs.ReleaseVersion.outputs.build_version }}
release_build: true
secrets: inherit
Publish:
if: jobs.Build.result == 'success'

Check failure on line 43 in .github/workflows/start_release.yml

View workflow run for this annotation

GitHub Actions / [ RELEASE ] Package & Deploy

Invalid workflow file

The workflow is not valid. .github/workflows/start_release.yml (Line: 43, Col: 9): Unrecognized named-value: 'jobs'. Located at position 1 within expression: jobs.Build.result == 'success'

Check failure on line 43 in .github/workflows/start_release.yml

View workflow run for this annotation

GitHub Actions / [ RELEASE ] Package & Deploy

Invalid workflow file

The workflow is not valid. .github/workflows/start_release.yml (Line: 43, Col: 9): Unrecognized named-value: 'jobs'. Located at position 1 within expression: jobs.Build.result == 'success'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
BUILD_VERSION: ${{ needs.ReleaseVersion.outputs.build_version }}
steps:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 # v3.1.0
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
# the publishing section of your build.gradle
- name: Publish to GitHub Packages
run: ./gradlew publish
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_DEPENDENCY_GRAPH_ENABLED: false
- name: publish to sonar central
run: ./gradlew sonatypeCentralUpload
env:
GPG_SIGNING_KEY_PASSWORD: ${{ secrets.GPG_SIGNING_KEY_PASSWORD }}
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
SONATYPE_CENTRAL_USERNAME: ${{ secrets.SONATYPE_CENTRAL_USERNAME }}
SONATYPE_CENTRAL_PASSWORD: ${{ secrets.SONATYPE_CENTRAL_PASSWORD }}
GITHUB_DEPENDENCY_GRAPH_ENABLED: false